From 6d7c18a0190ec489a64dfdda227993ba22f03ef2 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 09 一月 2025 14:05:50 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/AGV_FLExtend.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 6 ++ 代码管理/淮安PDA/pages/stash/pickingMat.vue | 14 ++++-- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 12 ++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 22 +++++++++- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 1 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 9 +--- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 11 ++++- 8 files changed, 57 insertions(+), 20 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" index ea1acd6..1d73209 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" @@ -29,7 +29,11 @@ /// </summary> [Description("璐ㄦ鍑哄簱")] OutQuality = 130, - + /// <summary> + /// 绌虹鍑哄簱 + /// </summary> + [Description("绌虹鍑哄簱")] + OutEmpty = 140, /// <summary> /// 閲囪喘鍏ュ簱 /// </summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index 80d033d..833dff5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -28,7 +28,6 @@ using System.Text; using System.Threading.Tasks; using WIDESEA_DTO.Agv; -using WIDESEAWCS_Common; using WIDESEAWCS_Common.APIEnum; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; @@ -150,14 +149,10 @@ List<Dt_WarehouseDevice> warehouseDevices = Db.Queryable<Dt_WarehouseDevice>().ToList(); List<Dt_Task> tasks = new List<Dt_Task>(); - - bool flag = false; - foreach (var item in taskDTOs) { if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null) { - flag = true; continue; } Dt_Task task = _mapper.Map<Dt_Task>(item); @@ -264,7 +259,7 @@ _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "鎺ユ敹WMS浠诲姟"); - content = (tasks.Count > 0 || flag) ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触"); + content = tasks.Count > 0 ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触"); } catch (Exception ex) { @@ -317,7 +312,7 @@ /// <returns></returns> public string? RequestAssignLocation(int taskNum, string roadwayNo) { - string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); + string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); if (responseContent != null && responseContent.Status && responseContent.Data != null) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" index cbbc35f..190fcb9 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" @@ -27,7 +27,7 @@ { try { - if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) + if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt()) task.CurrentAddress = GetAGVAddress(task.CurrentAddress); else task.NextAddress = GetAGVAddress(task.NextAddress); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" index a269f80..60d5863 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" @@ -31,6 +31,12 @@ OutQuality = 130, /// <summary> + /// 绌虹鍑哄簱 + /// </summary> + [Description("绌虹鍑哄簱")] + OutEmpty = 140, + + /// <summary> /// MES鍑哄簱 /// </summary> [Description("MES鍑哄簱")] @@ -69,6 +75,12 @@ MesMatReturn = 560, /// <summary> + /// 绌虹鍏ュ簱 + /// </summary> + [Description("绌虹鍏ュ簱")] + InEmpty = 600, + + /// <summary> /// 宸烽亾鍐呯Щ搴� /// </summary> [Description("宸烽亾鍐呯Щ搴�")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" index c17ee33..dec0d3c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" @@ -188,5 +188,6 @@ /// <param name="model"></param> /// <returns></returns> MesResponseContent SubstrateBack(SubstrateBackModel model); + WebResponseContent OutEmpty(int qty, string address, int warehouseId); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index 94d4ca8..4b1835e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -112,7 +112,7 @@ { x.AGVArea = agvDescription; }); - string response = HttpHelper.Post("http://127.0.0.1:9281/api/Task/ReceiveTask", taskDTOs.Serialize()); + string response = HttpHelper.Post("http://127.0.0.1:9291/api/Task/ReceiveTask", taskDTOs.Serialize()); return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒"); } @@ -166,7 +166,7 @@ return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅"); } - if (stockInfo.Details.Count == 0) + if (stockInfo.Details.Count == 0 && stockInfo.PalletType != PalletTypeEnum.Empty.ObjToInt()) { return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨鏄庣粏淇℃伅"); } @@ -187,6 +187,22 @@ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == task.WarehouseId); stockInfo.LocationCode = locationInfo.LocationCode; + + #region 绌虹鍏ュ簱 + if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()) + { + stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(); + task.TaskStatus = (int)TaskStatusEnum.Finish; + _unitOfWorkManage.BeginTran(); + BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); + _stockRepository.StockInfoRepository.UpdateData(stockInfo); + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted); + _unitOfWorkManage.CommitTran(); + return WebResponseContent.Instance.OK(); + } + #endregion + Dt_InboundOrder? inboundOrder = _inboundRepository.InboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x => x.Details).First(); List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>(); if (stockInfo.StockStatus == StockStatusEmun.鍏ュ簱纭.ObjToInt()) @@ -245,7 +261,7 @@ { foreach (var model in stockInfo.Details) { - TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo,MaterialName=model.MaterielName ,Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); + TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo, MaterialName = model.MaterielName, Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 7e410ca..32938b5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -136,7 +136,7 @@ }; Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.WarehouseId == WarehouseId); if (locationInfo == null) return WebResponseContent.Instance.Error($"鏈壘鍒板綋鍓嶅簱鍖鸿揣浣嶄俊鎭�"); - locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfo.RoadwayNo, (PalletTypeEnum)stockInfo.PalletType, stockInfo.WarehouseId); + locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfo.RoadwayNo, stockInfo.PalletType, stockInfo.WarehouseId); if (locationInfo == null) { return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅"); @@ -151,7 +151,7 @@ Roadway = locationInfo.RoadwayNo, SourceAddress = address, TargetAddress = locationInfo.LocationCode, - TaskType = TaskTypeEnum.Inbound.ObjToInt(), + TaskType = TaskTypeEnum.InEmpty.ObjToInt(), TaskStatus = TaskStatusEnum.New.ObjToInt(), WarehouseId = stockInfo.WarehouseId, PalletType = stockInfo.PalletType @@ -184,11 +184,16 @@ var stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate)); if (stockInfos == null) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}鏈壘鍒扮┖绠卞簱瀛�"); if (stockInfos.Count < qty) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}绌虹搴撳瓨涓嶈冻,搴撳瓨鏁般�恵stockInfos.Count}銆�"); - List<Dt_Task> tasks = GetTasks(stockInfos); + List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutEmpty); stockInfos.ForEach(x => { x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt(); }); + tasks.ForEach(x => + { + x.TargetAddress = address; + x.NextAddress = address; + }); _unitOfWorkManage.BeginTran(); BaseDal.AddData(tasks); _stockRepository.StockInfoRepository.UpdateData(stockInfos); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" index 22087ea..322af18 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" @@ -113,7 +113,11 @@ onLoad(res) { this.barcodefocus = false; this.warehouseId = res.warehouseId; + if (this.warehouseId == 5) { + this.address = "8005" + } this.istrue = false; + this.addressFocus = false; }, methods: { onClickItem(e) { @@ -185,10 +189,10 @@ } this.$u.post('/api/OutStockLockInfo/MaterialPick?palletCode=' + this.barcode, {}).then(res => { if (res.status) { - if(this.warehouseId==5){ - this.Finish("8005"); - } - + // if(this.warehouseId==5){ + // this.Finish("8005"); + // } + uni.$showMsg('鎷i�夋垚鍔�!') this.barcode = ""; this.matInfos = []; @@ -200,7 +204,7 @@ } }) }, - Finish(code){ + Finish(code) { this.$u.post('http://127.0.0.1:9291/api/CTU_AGV/PutFinish?&code=' + code).then( res => { if (res.status) { -- Gitblit v1.9.3