From bb56b2b6f21acb7c69c02585e5bc534d2f67715f Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 27 三月 2025 17:13:35 +0800 Subject: [PATCH] WMS首页优化,WCS优化AGV和产线、输送线交互逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 49 +++ 项目代码/芜湖三一PDA/pages/stash/index.vue | 37 ++ 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs | 82 +++++ 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/AGVsignal.cs | 29 + 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 1 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx | 0 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin | 0 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs | 24 + 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/全局异常错误日志_1740314366.log | 33 ++ 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_AGV.cs | 35 ++ 项目代码/WMS/WIDESEA_WMSClient/src/views/Home.vue | 300 +++++++++++++++++++ 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs | 27 + 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs | 1 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml.user | 2 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2 | 0 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 12 项目代码/芜湖三一PDA/pages/stash/OutTaskFinish.vue | 98 ++++++ 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationArea.cs | 31 ++ 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/07cf7dda-5295-4f4b-9336-422d595dd357.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 4 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698e115f-10a6-4d66-9c6c-0a7e0aa6fd18.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs | 18 + 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/AGVController.cs | 9 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 5 项目代码/芜湖三一PDA/pages.json | 7 /dev/null | 0 项目代码/WCS/WIDESEAWCS_Client/public/webconfig.js | 4 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml.user | 2 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs | 34 + 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6932af6-8d8f-4e73-bd41-7446fef38bd3.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 5 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 1 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | 11 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs | 8 项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo | 0 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/70e01871-3b79-4668-9ab3-ebc5d49338e8.vsidx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs | 2 39 files changed, 815 insertions(+), 56 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/public/webconfig.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/public/webconfig.js" index 117cb6a..de3313c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/public/webconfig.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/public/webconfig.js" @@ -1,4 +1,4 @@ window.webConfig = { - "webApiBaseUrl": "http://192.168.188.49:9291/", - "webApiProduction":"http://192.168.188.61:8098/" + "webApiBaseUrl": "http://192.168.10.86:9291/", + "webApiProduction":"http://192.168.10.88:8098/" } \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx" new file mode 100644 index 0000000..87e4b8d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d6946a07-a1d5-41f6-8f15-b49535534956.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/70e01871-3b79-4668-9ab3-ebc5d49338e8.vsidx" similarity index 64% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d6946a07-a1d5-41f6-8f15-b49535534956.vsidx" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/70e01871-3b79-4668-9ab3-ebc5d49338e8.vsidx" index 3ed9409..52d944a 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d6946a07-a1d5-41f6-8f15-b49535534956.vsidx" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/70e01871-3b79-4668-9ab3-ebc5d49338e8.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4bb3ebdc-5f2a-4f84-bc73-c93c943a8d3a.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx" similarity index 73% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4bb3ebdc-5f2a-4f84-bc73-c93c943a8d3a.vsidx" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx" index 4ea1a59..669848e 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4bb3ebdc-5f2a-4f84-bc73-c93c943a8d3a.vsidx" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05f074bc-563f-4d3b-8cd6-a6d898ce75fc.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx" similarity index 69% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05f074bc-563f-4d3b-8cd6-a6d898ce75fc.vsidx" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx" index 5d13500..34cf1a9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05f074bc-563f-4d3b-8cd6-a6d898ce75fc.vsidx" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ef5f87e0-53ad-445a-bc11-e34fb9ca7e46.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ef5f87e0-53ad-445a-bc11-e34fb9ca7e46.vsidx" deleted file mode 100644 index f26a3dd..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ef5f87e0-53ad-445a-bc11-e34fb9ca7e46.vsidx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" index baa34aa..2c98fd1 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" @@ -276,5 +276,6 @@ /// <param name="saveModel"></param> /// <returns></returns> WebResponseContent AGVUpdateTaskState(AGVUpdateTaskDTO saveModel); + WebResponseContent OutTaskFinish(string address); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/AGVController.cs" index d27009d..6b843a6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/AGVController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/AGVController.cs" @@ -31,5 +31,14 @@ { return AGVsignal.AGVRequestin(saveModel); } + /// <summary> + /// 杈撻�佺嚎鍏ュ彛鏀捐揣瀹屾垚 + /// </summary> + /// <returns></returns> + [HttpPost, Route("ReleaseCompleted")] + public WebResponseContent ReleaseCompleted() + { + return AGVsignal.ReleaseCompleted(); + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" index 3037b83..a435b8b 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" @@ -60,5 +60,16 @@ { return Service.AGVUpdateTaskState(saveModel); } + + /// <summary> + /// 浜哄伐浣跨敤PDA鍑哄簱瀹屾垚锛岄噴鏀惧钩搴撳簱浣� + /// </summary> + /// <param name="saveModel">璇锋眰鍙傛暟</param> + /// <returns></returns> + [HttpPost, Route("OutTaskFinish"), AllowAnonymous] + public WebResponseContent OutTaskFinish(string Address) + { + return Service.OutTaskFinish(Address); + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" index 1fec32a..eea773c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" @@ -107,12 +107,12 @@ app.ConfigureApplication();//配置文件 app.UseApplicationSetup();//启动配置 app.UseSession(); -if (app.Environment.IsDevelopment()) -{ - //todo - //app.UseSwaggerAuthorized(); - app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html")); -}//判断是否需要打开swagger +//if (app.Environment.IsDevelopment()) +//{ +//todo +//app.UseSwaggerAuthorized(); +app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html")); +//}//判断是否需要打开swagger app.UseIpLimitMiddle(); app.UseApiLogMiddleware(); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml.user" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml.user" index ead4e8a..93f9688 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml.user" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml.user" @@ -6,7 +6,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>E:\IISText\鑺滄箹涓変竴\WCS</_PublishTargetUrl> - <History>True|2025-02-14T09:36:18.5767695Z;True|2025-02-14T14:39:49.5856199+08:00;</History> + <History>True|2025-03-27T08:23:43.2657011Z;True|2025-03-25T12:01:47.0052741+08:00;True|2025-02-14T17:36:18.5767695+08:00;True|2025-02-14T14:39:49.5856199+08:00;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" index a81c86a..86387f5 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" @@ -25,8 +25,8 @@ "ApiName": "WIDESEA", "WMSIP": "http://127.0.0.1:9290", "wmsInterfaceAddress": "/api/WCS/GetPosition,/api/WCS/ConveyorLineRequestInbound,/api/WCS/StackerCraneRequestInbound,/api/WCS/UpdateTaskStatus,/api/ProductionLine/ProductionlineRequest", - "AGVIP": "http://192.168.1.20:81", - "agvInterfaceAddress": "/pt/taskSent,/pt/taskResult?outID=", + "AGVIP": "http://192.168.10.140:81", + "agvInterfaceAddress": "/pt/taskSent,/pt/taskResult", "OKAddress": "104", "NGAddress": "101", "ExpMinutes": 120, diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_AGV.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_AGV.cs" index 332cf63..883ccd3 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_AGV.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_AGV.cs" @@ -7,7 +7,9 @@ using System.Threading.Tasks; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; +using WIDESEAWCS_Core.Helper; using WIDESEAWCS_DTO.TaskInfo; +using WIDESEAWCS_DTO.WMSInfo; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob.Models; @@ -73,7 +75,40 @@ // message = content.Message, //}; } + /// <summary> + /// 鍑哄簱浠诲姟瀹屾垚 + /// </summary> + /// <param name="Address"></param> + /// <returns></returns> + public WebResponseContent OutTaskFinish(string Address) + { + try + { + Dt_Task dt_Task = BaseDal.QueryFirst(x => x.TargetAddress == Address); + if (dt_Task != null && dt_Task.TaskState != TaskOutStatusEnum.AGV_OutFinish.ObjToInt()) + throw new Exception($"鍦板潃銆恵Address}銆戝瓨鍦ㄦ湭瀹屾垚AGV浠诲姟"); + Dt_Router _Router = _routerRepository.QueryFirst(x => x.NextPosi == Address); + if (_Router == null) throw new Exception($"鍦板潃銆恵Address}銆戞湭閰嶇疆璺敱"); + _Router.Remark = "鏈崰鐢�"; + Db.Ado.BeginTran(); + _routerRepository.UpdateData(_Router); + if (dt_Task != null) + { + dt_Task.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt(); + WMSTaskDTO WMStask = _mapper.Map<WMSTaskDTO>(dt_Task); + AddTask_Hty(dt_Task, TaskOperateTypeEnum.AutoComplete); + HttpHelper.PostAsync(WMSInterfaceAddress.UpdateTaskStatus, WMStask.ToJson(), headers: new Dictionary<string, string>()); + } + Db.Ado.CommitTran(); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + Db.Ado.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + } public static string GetEnumDescription<T>(T value) where T : Enum { FieldInfo fieldInfo = typeof(T).GetField(value.ToString()); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index a6429fa..6b49947 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -37,6 +37,7 @@ using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob.Models; +using WIDESEAWCS_QuartzJob.Repository; using WIDESEAWCS_QuartzJob.Service; namespace WIDESEAWCS_TaskInfoService @@ -44,6 +45,7 @@ public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService { private readonly IRouterService _routerService; + private readonly IRouterRepository _routerRepository; private readonly ITaskExecuteDetailService _taskExecuteDetailService; private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository; private readonly ITaskHtyService _taskHtyService; @@ -63,9 +65,10 @@ public List<int> TaskRelocationTypes => typeof(TaskRelocationTypeEnum).GetEnumIndexList(); - public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, ITaskHtyService taskHtyService, IMapper mapper) : base(BaseDal) + public TaskService(ITaskRepository BaseDal, IRouterService routerService, IRouterRepository routerRepository, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, ITaskHtyService taskHtyService, IMapper mapper) : base(BaseDal) { _routerService = routerService; + _routerRepository = routerRepository; _taskExecuteDetailService = taskExecuteDetailService; _taskExecuteDetailRepository = taskExecuteDetailRepository; _taskHtyService = taskHtyService; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs" index b5295ff..06019e8 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs" @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection.Metadata; +using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Common.TaskEnum; @@ -39,7 +40,6 @@ { try { - #region 浠诲姟鏇存柊 var Tasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState > (int)TaskInStatusEnum.InNew && @@ -48,7 +48,11 @@ x.TaskState < (int)TaskOutStatusEnum.AGV_OutFinish).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); foreach (var Task in Tasks) { - var ResultData = HttpHelper.PostAsync(AGVInterfaceAddress.taskResult + Task.TaskNum, null, headers: new Dictionary<string, string>()); + var obj = new + { + outID = Task.TaskNum.ToString() + }; + var ResultData = HttpHelper.PostAsync(AGVInterfaceAddress.taskResult, obj.ToJson(), headers: new Dictionary<string, string>()); if (ResultData.Result != null) { var content = JsonConvert.DeserializeObject<AGVReturnInfo>(ResultData.Result); @@ -65,10 +69,18 @@ { Task.TaskState = _taskService.TaskInboundTypes.Contains(Task.TaskType) ? (int)TaskInStatusEnum.AGV_InFinish : TaskOutStatusEnum.AGV_OutFinish.ObjToInt(); Task.CurrentAddress = Task.NextAddress; + Task.NextAddress = ""; List<Dt_Router> routers = _routerService.QueryNextRoutes(Task.CurrentAddress, Task.TargetAddress); if (routers.Count > 0) { Task.NextAddress = routers.FirstOrDefault()?.ChildPosi ?? ""; + } + if (Task.TaskState == TaskOutStatusEnum.AGV_OutFinish.ObjToInt()) + { + #region 鍚慦MS鍙嶉鍫嗗灈鏈轰换鍔″畬鎴� + WMSTaskDTO WMStask = _mapper.Map<WMSTaskDTO>(Task); + HttpHelper.PostAsync(WMSInterfaceAddress.UpdateTaskStatus, WMStask.ToJson(), headers: new Dictionary<string, string>()); + #endregion } } break; @@ -95,7 +107,7 @@ if (content.code == "20000") { var task = newTasks.Where(x => x.TaskNum == agvTaskDTO.outID.ObjToInt()).First(); - task.TaskState = _taskService.TaskInboundTypes.Contains(task.TaskType)? TaskInStatusEnum.AGV_InSend.ObjToInt(): TaskOutStatusEnum.AGV_OutSend.ObjToInt(); + task.TaskState = _taskService.TaskInboundTypes.Contains(task.TaskType) ? TaskInStatusEnum.AGV_InSend.ObjToInt() : TaskOutStatusEnum.AGV_OutSend.ObjToInt(); UpnewTasks.Add(task); } else diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/AGVsignal.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/AGVsignal.cs" index 3926374..4018650 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/AGVsignal.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/AGVsignal.cs" @@ -61,7 +61,6 @@ CommonConveyorLine? conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceName == "杈撻�佺嚎") as CommonConveyorLine; if (conveyorLine == null) throw new Exception("鏈壘鍒拌緭閫佺嚎璁惧淇℃伅"); if (!conveyorLine.IsConnected) throw new Exception($"杈撻�佺嚎璁惧閫氳寮傚父"); - //conveyorLine.SetValue(ConveyorLine_AGV.WriteRGPutComplete, true, "1001");//浜哄伐鏀捐揣瀹屾垚 switch (conveyor.Type) { case 1: @@ -79,6 +78,8 @@ } break; case 2: + break; + case 3: { if (conveyor.Station == "1001") { @@ -101,9 +102,6 @@ } } } - break; - case 3: - break; case 4: @@ -138,9 +136,11 @@ { case 1: if (agvState != conveyor.Type) throw new Exception("浜х嚎涓嶅厑璁歌繘鍏ヤ綔涓�"); + content.OK(); break; case 2: - if (agvState != conveyor.Type) throw new Exception("浜х嚎涓嶅厑璁哥寮�"); + //if (agvState != conveyor.Type) throw new Exception("浜х嚎涓嶅厑璁哥寮�"); + content.OK(); break; case 3: content.Status = ProductionLine.SetValue(ProductionLineDBName.Wrequest, 2); @@ -155,5 +155,24 @@ } return content; } + /// <summary> + /// 鍏ュ簱杈撻�佺嚎浜哄伐鏀捐揣瀹屾垚 + /// </summary> + /// <returns></returns> + public static WebResponseContent ReleaseCompleted() + { + try + { + CommonConveyorLine? conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceName == "杈撻�佺嚎") as CommonConveyorLine; + if (conveyorLine == null) throw new Exception("鏈壘鍒拌緭閫佺嚎璁惧淇℃伅"); + if (!conveyorLine.IsConnected) throw new Exception($"杈撻�佺嚎璁惧閫氳寮傚父"); + conveyorLine.SetValue(ConveyorLine_AGV.WriteRGPutComplete, true, "1001");//浜哄伐鏀捐揣瀹屾垚 + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" index 1865c95..bc2fa25 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" @@ -55,7 +55,7 @@ { task.TaskState = TaskOutStatusEnum.Line_OutFinish.ObjToInt(); task.CurrentAddress = childDeviceCode; - task.NextAddress = router.ChildPosi; + task.NextAddress = router.NextPosi; router.Remark = "鍗犵敤"; _routerRepository.UpdateData(router); _taskService.UpdateData(task); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" index 7bc6222..e29bab2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs" @@ -40,6 +40,15 @@ OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams"); if (ProductionLine != null) { + //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() + //{ + // stationCode = ProductionLine.DeviceCode, + // traytype = 4, + // Barcode = "25000037", + // batchNo = "250325T1", + //}; + //var content = ProductionLineToWMSRequest(MaterielGroupDTO); + #region MyRegion var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request); if (request == 1) { @@ -48,19 +57,24 @@ if (traytype == 4) { var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode).Replace("\0", ""); - var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", ""); - ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() + var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode); + if (task == null) { - stationCode = ProductionLine.DeviceCode, - traytype = traytype, - Barcode = Barcode, - batchNo = batchNo, - }; - var content = ProductionLineToWMSRequest(MaterielGroupDTO); - if (content.Status) - ProductionLine.SetValue(ProductionLineDBName.Wrequest, request); + var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", ""); + ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() + { + stationCode = ProductionLine.DeviceCode, + traytype = traytype, + Barcode = Barcode, + batchNo = batchNo, + }; + var content = ProductionLineToWMSRequest(MaterielGroupDTO); + if (content.Status) + ProductionLine.SetValue(ProductionLineDBName.Wrequest, request); + } } } + #endregion } #endregion } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue" index 820437a..bcc2fa7 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Home.vue" @@ -1,24 +1,304 @@ <template> - <div class="title"></div> + <div> + <!-- height:40px --> + <div class="title">搴撲綅骞抽潰鍥�</div> + + <!-- <div>鍙樉绀轰竴涓尯鍩熺殑涓�涓爢鍨涙満瀵瑰簲鐨勭姸鎬�</div> --> + <div class="main" :style="{ height: mian_height }"> + <!-- 骞抽潰鍥炬樉绀哄尯鍩� --> + <div class="right"> + <div v-for="layer in locationData" :key="layer.index"> + <div class="row_tip">绗瑊{ layer.index }}灞�</div> + <div class="row" v-for="row in layer.rows" :key="row.index"> + <el-tooltip + v-for="col in row.cols" + :key="col.column" + effect="dark" + :content="getTooltipContent(col)" + placement="top" + :show-after="200" + :hide-after="0" + ><div + class="item" + :style="{ 'background-color': GetBgColor(col) }" + > + {{ row.index }}-{{ col.column }}-{{ layer.index }} + </div> + </el-tooltip> + </div> + </div> + </div> + + <!-- 閫夋嫨鎻愮ず鍖哄煙 --> + <div class="left"> + <!-- <div>鍖哄煙锛�</div> + <el-select + size="mini" + filterable + v-model="Area.shelf_code" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in slectData" + :value="item.shelf_code" + :label="item.house_name" + :key="item.house_name" + ></el-option> + </el-select> --> + <!-- <div class="tipText">鍫嗗灈鏈猴細</div> + <el-select + size="mini" + clearable + filterable + @change="SCChange" + v-model="Area.tunnel" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in scList" + :value="item" + :label="item" + :key="item" + ></el-option> + </el-select> --> + <!-- <div class="tipText">灞傦細</div> + <el-select + size="mini" + clearable + filterable + @change="SCChange" + v-model="Area.layer" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in layers" + :value="item" + :label="item" + :key="item" + ></el-option> + </el-select> --> + <br /> + <ElButton type="success" class="btn" @click="GetViewData" + >鍒锋柊</ElButton + > + + <div style="margin-top: 80px"> + <div>璇存槑</div> + <div v-for="item in infoMsg" :key="item.bgcolor"> + <div class="infoMsg" :style="{ 'background-color': item.bgcolor }"> + {{ item.msg }} + </div> + </div> + </div> + </div> + </div> + </div> </template> <script> -import { ref, reactive } from 'vue' +import { ElButton } from "element-plus"; export default { - setup() { + data() { return { - - } - } -} + slectData: [], + scList: [], + layers: [], + Area: { house_name: "", tunnel: "", shelf_code: "" }, + mian_height: "", + infoMsg: [ + { bgcolor: "lightgreen", msg: "绌鸿揣浣�", state: 0 }, + { bgcolor: "orange", msg: "鏈夎揣", state: "Stored" }, + { bgcolor: "#2BB3D5", msg: "鎵ц涓�", state: "InAssigned" }, + { bgcolor: "#ccc", msg: "绂佺敤", state: "Lock" }, + { bgcolor: "red", msg: "寮傚父", state: "error" }, + { bgcolor: "#b7ba6b", msg: "绌烘墭", state: 99 }, + ], + locationData: [], + }; + }, + computed: { + GetBgColor() { + return (col) => { + var bgColor = "#b7ba6b"; + //浼樺厛鏄剧ず绂佺敤鐘舵�� + if (col.enalbeStatus == 3) { + this.infoMsg.forEach((el) => { + if (el.state == "Lock") { + bgColor = el.bgcolor; + } + }); + } else { + this.infoMsg.forEach((el) => { + if ( + col.locationStatus == 4 || + col.locationStatus == 6 || + col.locationStatus == 7 + ) { + if (el.state == "InAssigned") { + bgColor = el.bgcolor; + } + } else if (col.locationStatus == 2 || col.locationStatus == 3) { + if (el.state == "Stored") { + bgColor = el.bgcolor; + } + } else if (el.state == col.locationStatus) { + bgColor = el.bgcolor; + } + }); + } + return bgColor; + }; + }, + }, + watch: { + //鍒囨崲搴撳尯 + "Area.shelf_code"(newValue, oldValue) { + this.scList = []; + this.layers = []; + this.slectData.forEach((e) => { + if (e.areaName == newValue) { + this.Area.tunnel = e.tunnel[0]; + this.scList = e.tunnel; + this.Area.layer = "绗�" + e.layers[0] + "灞�"; + this.layers = e.layers; + } + }); + this.GetViewData(); + }, + }, + methods: { + getTooltipContent(col) { + return `鐘舵��: ${this.getStatusText(col.locationStatus)} + 鍚敤鐘舵��: ${this.getEnableStatusText(col.enalbeStatus)} + 鎵樼洏鍙�: ${col.palletNo || "鏃�"}`; + }, + getStatusText(status) { + const statusMap = { + 0: "绌鸿揣浣�", + 2: "鏈夎揣", + 3: "鏈夎揣", + 4: "鎵ц涓�", + 6: "鎵ц涓�", + 7: "鎵ц涓�", + 99: "绌烘墭", + }; + return statusMap[status] || "鏈煡鐘舵��"; + }, + getEnableStatusText(status) { + const enableMap = { + 1: "姝e父", + 3: "绂佺敤", + }; + return enableMap[status] || "鏈煡"; + }, + GetViewData() { + var _this = this; + this.http + .post("/api/StockView/GetLocationStockView", {}, "鏌ヨ涓�") + .then((x) => { + _this.locationData = x.data; + // console.log("鍚庣杩斿洖:", x.data); + // console.log("杩斿洖鏁版嵁:", _this.locationData); + }); + }, + // 鍒囨崲鍫嗗灈鏈� + SCChange() { + this.GetViewData(); + }, + }, + mounted() { + var mainHeight = document.getElementById("vol-main"); + this.mian_height = mainHeight.offsetHeight - 40 + "px"; + var _this = this; + //鍔犺浇涓嬫媺閫夐」 + this.http + .get("/api/LocationInfo/GetLocationLayer", {}, "鏌ヨ涓�") + .then((x) => { + _this.slectData = x; + //鍔犺浇绗竴涓尯鍩燂紝绗竴涓爢鍨涙満 + _this.Area.shelf_code = _this.slectData[0].areaName; + _this.scList = _this.slectData[0].tunnel; + _this.layers = _this.slectData[0].layers; + }); + this.GetViewData(); + }, + components: { ElButton }, +}; </script> <style scoped> +.left { + height: 100%; + float: left; + width: 18%; + /* background: lightblue; */ + padding-top: 20px; + padding-left: 20px; +} + +.right { + padding: 9px; + height: 98%; + overflow-y: auto; + overflow-x: auto; + float: left; + width: 82%; + padding-top: 5px; +} + .title { - line-height: 70vh; text-align: center; - font-size: 28px; - color: orange; + padding: 5px 0px; + font-size: 20px; + font-weight: bold; + width: 82%; +} + +.row_tip { + font-size: 16px; + padding-left: 5px; +} + +.row { + overflow: auto; + margin-bottom: 11px; +} + +.item { + float: left; + width: 66px; + height: 38px; + margin: 3px; + background-color: lightblue; + text-align: center; + font-size: 14px; + border-radius: 3px; + line-height: 38px; +} + +.tipText { + margin-top: 10px; +} + +.btn { + margin-top: 15px; +} + +.infoMsg { + float: left; + width: 63px; + height: 35px; + margin: 3px; + text-align: center; + font-size: 14px; + border-radius: 3px; + line-height: 38px; +} +</style> + +<style> +.el-input { + width: 180px; } </style> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/07cf7dda-5295-4f4b-9336-422d595dd357.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/07cf7dda-5295-4f4b-9336-422d595dd357.vsidx" new file mode 100644 index 0000000..eff36f1 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/07cf7dda-5295-4f4b-9336-422d595dd357.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698e115f-10a6-4d66-9c6c-0a7e0aa6fd18.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698e115f-10a6-4d66-9c6c-0a7e0aa6fd18.vsidx" new file mode 100644 index 0000000..6049318 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698e115f-10a6-4d66-9c6c-0a7e0aa6fd18.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6c0962e3-1750-4e24-a425-5ec6cb7fd82e.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6c0962e3-1750-4e24-a425-5ec6cb7fd82e.vsidx" deleted file mode 100644 index 8496d3b..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6c0962e3-1750-4e24-a425-5ec6cb7fd82e.vsidx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/78897f8c-c068-4b4e-b743-c65f6f8e67ca.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/78897f8c-c068-4b4e-b743-c65f6f8e67ca.vsidx" deleted file mode 100644 index 8c41248..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/78897f8c-c068-4b4e-b743-c65f6f8e67ca.vsidx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6932af6-8d8f-4e73-bd41-7446fef38bd3.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6932af6-8d8f-4e73-bd41-7446fef38bd3.vsidx" new file mode 100644 index 0000000..77b43a0 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6932af6-8d8f-4e73-bd41-7446fef38bd3.vsidx" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f94d9248-1467-4faa-b8db-c6ec3c26f904.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f94d9248-1467-4faa-b8db-c6ec3c26f904.vsidx" deleted file mode 100644 index 27132b4..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f94d9248-1467-4faa-b8db-c6ec3c26f904.vsidx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2" index 57edf26..fd4a52a 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" index 020a421..cb343dd 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin" index c34db33..b3d09e8 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" index c35b38c..e51ab53 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" @@ -5,6 +5,7 @@ using System.Reflection.Metadata; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; @@ -119,7 +120,28 @@ } return content; } - + public object GetLocationLayer() + { + List<object> list = new List<object>(); + var data = Db.Ado.SqlQuery<LocationArea>(@"SELECT areaName,areaCode,roadwayNo,layer from Dt_AreaInfo as t1 + INNER JOIN + ( + select DISTINCT AreaId,RoadwayNo,Layer from Dt_LocationInfo + ) as t2 + on t1.Id=t2.AreaId"); + foreach (var item in data.GroupBy(t => t.areaName)) + { + var obj = new + { + areaName = item.Key, + areaCode = item.Max(x => x.areaCode), + tunnel = item.Select(t => t.roadwayNo).OrderBy(t => t).Distinct().ToList(), + Layers = item.Select(t => t.layer).OrderBy(t => t).ToList(), + }; + list.Add(obj); + } + return list; + } public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) { try diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationArea.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationArea.cs" new file mode 100644 index 0000000..89d608a --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationArea.cs" @@ -0,0 +1,31 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_Common +{ + public class LocationArea + { + /// <summary> + /// 搴撳尯鍚嶇О + /// </summary> + public string areaName { get; set; } + + /// <summary> + /// 搴撳尯缂栧彿 + /// </summary> + public string areaCode { get; set; } + + /// <summary> + /// 鍫嗗灈鏈� + /// </summary> + public string roadwayNo { get; set; } + /// <summary> + /// 灞� + /// </summary> + public string layer { get; set; } + } + +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" index 02e46c5..b86f4ae 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" @@ -72,4 +72,53 @@ [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))] public List<Dt_StockInfoDetail> Details { get; set; } } + public class LocationStockView + { + public int AreaId { get; set; } + + public string LocationCode { get; set; } + + public string LocationName { get; set; } + + public int Column { get; set; } + + public int Row { get; set; } + + public int Layer { get; set; } + + public int Depth { get; set; } + + public int LocationStatus { get; set; } + + public int LocationType { get; set; } + + public string RoadwayNo { get; set; } + + public int EnalbeStatus { get; set; } + + public string PalletCode { get; set; } + + public int Quantity { get; set; } + + public DateTime? InDate { get; set; } + + public string MaterielCode { get; set; } + + public string MaterielName { get; set; } + + public string OrderNo { get; set; } + + public string BatchNo { get; set; } + } + public class LocationLayer + { + public int index { get; set; } + public List<LocationRow> rows { get; set; } + } + public class LocationRow + { + public int index { get; set; } + + public List<LocationStockView> cols { get; set; } + } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" index 99bdbe1..5e5bc46 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" @@ -62,5 +62,6 @@ /// <returns></returns> WebResponseContent UpdateStatus(List<string> locationCodes,int Statu); WebResponseContent GetLocationCodes(); + object GetLocationLayer(); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs" index 4dbc93f..346c5f8 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs" @@ -14,5 +14,6 @@ PageGridData<StockViewDTO> GetPageData(PageDataOptions options); object GetDetailPage(PageDataOptions pageData); + WebResponseContent GetLocationStockView(int Layer); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs" index dc8ce5c..b13506a 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs" @@ -1,4 +1,5 @@ 锘� +using MailKit.Search; using Microsoft.AspNetCore.Http; using SqlSugar; using System; @@ -9,6 +10,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; @@ -16,6 +18,7 @@ using WIDESEA_Core.Helper; using WIDESEA_Core.Utilities; using WIDESEA_DTO.Stock; +using WIDESEA_IBasicRepository; using WIDESEA_IStockRepository; using WIDESEA_IStockService; using WIDESEA_Model.Models; @@ -25,12 +28,14 @@ public partial class StockViewService : IStockViewService { private readonly IUnitOfWorkManage _unitOfWorkManage; + private readonly IStockRepository _stockRepository; private readonly SqlSugarClient _dbBase; - public StockViewService(IUnitOfWorkManage unitOfWorkManage) + public StockViewService(IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository) { _unitOfWorkManage = unitOfWorkManage; _dbBase = unitOfWorkManage.GetDbClient(); + _stockRepository = stockRepository; } public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options) @@ -163,6 +168,81 @@ } + public virtual WebResponseContent GetLocationStockView(int Layer) + { + WebResponseContent content = new WebResponseContent(); + try + { + List<LocationStockView> locationStockViews = new List<LocationStockView>(); + ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); + List<Dt_LocationInfo> dt_LocationInfos = sugarQueryable.ToList(); + + ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Where(x => dt_LocationInfos.Select(x => x.LocationCode).ToList().Contains(x.LocationCode)).Includes(x => x.Details); + List<Dt_StockInfo> StockInfos = sugarQueryable1.OrderBy(x => x.InDate).ToList(); + foreach (var dt_LocationInfo in dt_LocationInfos) + { + LocationStockView locationStockView = new LocationStockView() + { + AreaId = dt_LocationInfo.AreaId, + Column = dt_LocationInfo.Column, + Depth = dt_LocationInfo.Depth, + EnalbeStatus = dt_LocationInfo.EnableStatus, + Layer = dt_LocationInfo.Layer, + LocationCode = dt_LocationInfo.LocationCode, + LocationName = dt_LocationInfo.LocationName, + LocationStatus = dt_LocationInfo.LocationStatus, + LocationType = dt_LocationInfo.LocationType, + RoadwayNo = dt_LocationInfo.RoadwayNo, + Row = dt_LocationInfo.Row + }; + List<Dt_StockInfo> dt_StockInfos = StockInfos.Where(x => x.LocationCode == dt_LocationInfo.LocationCode).ToList(); + if (dt_StockInfos.Count > 0 && dt_StockInfos != null) + { + locationStockView.BatchNo = dt_StockInfos.First().Details.First().BatchNo; + locationStockView.InDate = dt_StockInfos.First().InDate; + locationStockView.MaterielCode = dt_StockInfos.First().Details.First().MaterielCode; + locationStockView.MaterielName = dt_StockInfos.First().Details.First().MaterielName; + locationStockView.OrderNo = dt_StockInfos.First().Details.First().OrderNo; + locationStockView.PalletCode = string.Join(",", dt_StockInfos.Select(x => x.PalletCode).ToList()); + locationStockView.Quantity = dt_StockInfos.Count; + } + locationStockViews.Add(locationStockView); + } + if (locationStockViews.Count > 0) + { + #region MyRegion + List<LocationLayer> layers = new List<LocationLayer>(); + foreach (var layer in locationStockViews.GroupBy(x => x.Layer)) + { + var rows = new List<LocationRow>(); + var data_rows = layer.GroupBy(t => t.Row); + foreach (var data_row in data_rows) + { + rows.Add(new LocationRow() + { + index = data_row.Key, + cols = data_row.OrderBy(x => x.Column).ToList() + }); + } + //rows=rows.OrderBy(x=>x.index).ToList(); + layers.Add(new LocationLayer() + { + index = layer.Key, + rows = rows + }); + } + #endregion + layers = layers.OrderBy(x => x.index).ToList(); + content.OK(data: layers); + } + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } + public virtual object GetDetailPage(PageDataOptions pageData) { Type t = typeof(StockViewDTO); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs" index 1699356..d7ac7e0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs" @@ -1,4 +1,5 @@ 锘縰sing Magicodes.IE.Core; +using MailKit.Search; using System; using System.Threading.Tasks; using WIDESEA_Core; @@ -29,12 +30,24 @@ if (stockInfo != null) throw new Exception($"鎵樼洏銆恵productionlineDTO.Barcode}銆戝凡瀛樺湪搴撳瓨淇℃伅"); stockInfo = new Dt_StockInfo(); stockInfo.Details = new List<Dt_StockInfoDetail>(); - var OrderNo = productionlineDTO.batchNo.Split('T')[0]; - Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo); - if (inboundOrder == null) throw new Exception($"鏈壘鍒板叆搴撳崟銆恵OrderNo}銆�"); - Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == productionlineDTO.batchNo); - if (inboundOrderDetail == null) throw new Exception($"鏈壘鍒版壒鍙枫�恵productionlineDTO.batchNo}銆戠殑鍏ュ簱璇︽儏"); - if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"鎵瑰彿銆恵productionlineDTO.batchNo}銆戠粍鐩樻暟閲忚秴鍑�"); + #region MyRegion + Dt_InboundOrderDetail inboundOrderDetail = _inboundService.InboundOrderDetailService.Repository.QueryFirst(x => x.BatchNo == productionlineDTO.batchNo); + if (inboundOrderDetail == null) + throw new Exception($"鏈壘鍒版壒鍙枫�恵productionlineDTO.batchNo}銆戠殑鍏ュ簱璇︽儏"); + if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) + throw new Exception($"鎵瑰彿銆恵productionlineDTO.batchNo}銆戠粍鐩樻暟閲忚秴鍑�"); + Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.Id == inboundOrderDetail.OrderId); + if (inboundOrder == null) throw new Exception($"鏈壘鍒版壒鍙枫�恵productionlineDTO.batchNo}銆戠殑鍏ュ簱澶磋〃"); + inboundOrder.Details = new List<Dt_InboundOrderDetail>() { inboundOrderDetail }; + #endregion + #region MyRegion + //var OrderNo = productionlineDTO.batchNo.Split('T')[0]; + //Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo); + //if (inboundOrder == null) throw new Exception($"鏈壘鍒板叆搴撳崟銆恵OrderNo}銆�"); + //Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == productionlineDTO.batchNo); + //if (inboundOrderDetail == null) throw new Exception($"鏈壘鍒版壒鍙枫�恵productionlineDTO.batchNo}銆戠殑鍏ュ簱璇︽儏"); + //if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"鎵瑰彿銆恵productionlineDTO.batchNo}銆戠粍鐩樻暟閲忚秴鍑�"); + #endregion Dt_Task dt_Task = new Dt_Task() { @@ -45,7 +58,7 @@ Creater = "System", PalletCode = productionlineDTO.Barcode, Roadway = "SC01", - OrderNo = OrderNo, + OrderNo = inboundOrder.OrderNo, TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), TaskState = InTaskStatusEnum.InNew.ObjToInt(), TaskType = TaskTypeEnum.Inbound.ObjToInt(), diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" index 49dd728..62b5056 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" @@ -46,6 +46,11 @@ return Service.GetLocationCodes(); } + [HttpGet, Route("GetLocationLayer")] + public object GetLocationLayer() + { + return Service.GetLocationLayer(); + } [HttpPost, Route("UpdateEnableStatus")] public WebResponseContent UpdateEnableStatus([FromBody] SaveModel saveModel) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs" index bbd9d96..165862d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs" @@ -15,7 +15,7 @@ public class StockViewController : Controller { private readonly IStockViewService _stockViewService; - public StockViewController(IStockViewService stockViewService) + public StockViewController(IStockViewService stockViewService) { _stockViewService = stockViewService; } @@ -31,5 +31,11 @@ { return _stockViewService.GetDetailPage(pageData); } + + [HttpPost, Route("GetLocationStockView")] + public WebResponseContent GetLocationStockView(int Layer) + { + return _stockViewService.GetLocationStockView(Layer); + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/\345\205\250\345\261\200\345\274\202\345\270\270\351\224\231\350\257\257\346\227\245\345\277\227_1740314366.log" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/\345\205\250\345\261\200\345\274\202\345\270\270\351\224\231\350\257\257\346\227\245\345\277\227_1740314366.log" index 96d377c..7d5a034 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/\345\205\250\345\261\200\345\274\202\345\270\270\351\224\231\350\257\257\346\227\245\345\277\227_1740314366.log" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/\345\205\250\345\261\200\345\274\202\345\270\270\351\224\231\350\257\257\346\227\245\345\277\227_1740314366.log" @@ -98,3 +98,36 @@ at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) +-------------------------------- +2025/3/24 11:19:09| +鍒楀悕 'layer' 鏃犳晥銆� +銆愯嚜瀹氫箟閿欒銆戯細鍒楀悕 'layer' 鏃犳晥銆� +銆愬紓甯哥被鍨嬨�戯細SqlException +銆愬紓甯镐俊鎭�戯細鍒楀悕 'layer' 鏃犳晥銆� +銆愬爢鏍堣皟鐢ㄣ�戯細 at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() + at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method) + at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) + at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + at SqlSugar.AdoProvider.GetDataReader(String sql, SugarParameter[] parameters) + at SqlSugar.AdoProvider.SqlQuery[T,T2,T3,T4,T5,T6,T7](String sql, Object parameters) + at SqlSugar.AdoProvider.SqlQuery[T](String sql, SugarParameter[] parameters) + at SqlSugar.AdoProvider.SqlQuery[T](String sql, Object parameters) + at WIDESEA_BasicService.LocationInfoService.GetLocationLayer() in E:\椤圭洰闆哱ChuanSuoCheKu\椤圭洰浠g爜\WMS\WIDESEA_WMSServer\WIDESEA_BasicService\Base\LocationInfoService.cs:line 126 + at Castle.Proxies.Invocations.ILocationInfoService_GetLocationLayer.InvokeMethodOnTarget() + at Castle.DynamicProxy.AbstractInvocation.Proceed() + at Castle.Proxies.IService`1Proxy_1.GetLocationLayer() + at WIDESEA_WMSServer.Controllers.Basic.LocationInfoController.GetLocationLayer() in E:\椤圭洰闆哱ChuanSuoCheKu\椤圭洰浠g爜\WMS\WIDESEA_WMSServer\WIDESEA_WMSServer\Controllers\Basic\LocationInfoController.cs:line 52 + at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() +--- End of stack trace from previous location --- + at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml.user" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml.user" index 2127638..7241faa 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml.user" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml.user" @@ -6,7 +6,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>E:\IISText\鑺滄箹涓変竴\WMS</_PublishTargetUrl> - <History>True|2025-03-18T08:14:40.3832855Z;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> + <History>True|2025-03-27T08:24:43.5017432Z;True|2025-03-18T16:14:40.3832855+08:00;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages.json" index ef4ee98..3635f02 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages.json" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages.json" @@ -86,6 +86,13 @@ } }, { + "path": "pages/stash/OutTaskFinish", + "style": { + "navigationBarTitleText": "鍑哄簱瀹屾垚", + "enablePullDownRefresh": false + } + }, + { "path": "pages/stash/pickingMat", "style": { "navigationBarTitleText": "鎷i��", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/OutTaskFinish.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/OutTaskFinish.vue" new file mode 100644 index 0000000..6132c0b --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/OutTaskFinish.vue" @@ -0,0 +1,98 @@ +<template> + <view> + <view class="itemstyle"> + <uni-forms label-width="180"> + <uni-forms-item label="骞冲簱鏉$爜:"> + <uni-easyinput type="text" placeholder="璇锋壂鎻忓钩搴撴潯鐮�" ref='midInput' :focus="!focus" v-model="barcode" + @input="barcodeInput" /> + </uni-forms-item> + <uni-forms-item> + <button @click="OutTaskFinish" type="primary" size="default" style="margin-top: 2%;">鍑哄簱纭</button> + </uni-forms-item> + </uni-forms> + </view> + <u-toast ref="uToast" /> + </view> +</template> + +<script> + const innerAudioContext = uni.createInnerAudioContext(); + export default { + data() { + return { + focus: false, + barcode: "", + address: "", + WarehouseId: "" + } + }, + onShow() {}, + onLoad(res) { + this.WarehouseId = res.warehouseId; + this.focus = false; + if (res.warehouseId == 5) { + this.address = "8005"; + } + }, + methods: { + voiceSpeech(src) { + innerAudioContext.src = src; // '../../static/success.mp3'; + innerAudioContext.play(); + }, + barcodeInput() { + this.$nextTick(function(x) { + if (this.barcode.length > 0) { + this.focus = true; + } + }) + }, + OutTaskFinish() { + if (this.barcode == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忓钩搴撴潯鐮�", + type: 'error' + }) + return; + } + this.$u.post('http://127.0.0.1:9291/api/Task/OutTaskFinish?Address=' + this.barcode).then( + res => { + if (res.status) { + this.$refs.uToast.show({ + title: "鍑哄簱鎴愬姛", + type: "success" + }) + this.barcode = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + } + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + .content { + display: flex; + height: 150px; + } + + .content-text { + font-size: 14px; + color: #666; + } + + .itemstyle { + margin-top: 30px; + margin-left: 5%; + } + + .headerstyle { + width: 90%; + } +</style> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/index.vue" index 269109a..1d7ef24 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/index.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/index.vue" @@ -68,7 +68,7 @@ return this.datas.find(x => x.text == text); }, clickCoupon(url) { - var _this=this; + var _this = this; if (url == "鍑虹┖鎵�") { uni.showModal({ title: '鎻愮ず锛�', @@ -77,8 +77,20 @@ if (res.confirm) { _this.PdaOutEmpty() //console.log('纭') - } else if (res.cancel) - { + } else if (res.cancel) { + // console.log('鍙栨秷') + } + } + }) + } else if (url == "鍏ュ簱鏀捐揣瀹屾垚") { + uni.showModal({ + title: '鎻愮ず锛�', + content: '鏄惁纭畾鏀捐揣瀹屾垚锛�', + success: function(res) { + if (res.confirm) { + _this.ReleaseCompleted() + //console.log('纭') + } else if (res.cancel) { // console.log('鍙栨秷') } } @@ -100,7 +112,7 @@ }); } }, - PdaOutEmpty(){ + PdaOutEmpty() { this.$u.post('/api/PDA/OutEmpty').then( res => { if (res.status) { @@ -117,6 +129,23 @@ } }) }, + ReleaseCompleted() { + this.$u.post('http://127.0.0.1:9291/api/AGV/ReleaseCompleted').then( + res => { + if (res.status) { + this.$refs.uToast.show({ + title: "鏀捐揣瀹屾垚鎴愬姛", + type: "success" + }) + this.qty = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + }, lock() { console.log("lock") if (this.hasLogin()) { -- Gitblit v1.9.3