From 67348f250a1b7970059698002949a5e0a5f3c52f Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 14 八月 2025 08:51:04 +0800 Subject: [PATCH] 上传最新代码 --- 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs | 64 -------------------------------- 1 files changed, 0 insertions(+), 64 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" index 8805d0a..d8f60b7 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" @@ -140,70 +140,6 @@ } } - public WebResponseContent AGVTasks(SaveModel saveModel) - { - try - { - var palletCode = saveModel.MainData["barcode"].ToString(); - var stationCode = saveModel.MainData["address"].ToString(); - var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); - Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId); - if (warehouse == null) - { - return WebResponseContent.Instance.Error("鏈壘鍒板簱鍖�"); - } - - Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId); - if (task != null) - { - return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟"); - } - if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null && warehouse.WarehouseCode != WarehouseEnum.HA58.ToString()) - { - return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�"); - } - Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); - if (stockInfo == null) - { - return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); - } - if (stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt()) - { - return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘"); - } - if (warehouseId != stockInfo.WarehouseId) - { - return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�"); - } - Dt_Task newTask = new Dt_Task() - { - CurrentAddress = stationCode, - Grade = 0, - NextAddress = "", - PalletCode = palletCode, - Roadway = warehouse.Remark,//鏌ヨ瀵瑰簲绾胯竟浠撳湴鍧�宸烽亾鍙� - SourceAddress = stationCode, - TargetAddress = "", - TaskType = TaskTypeEnum.OutAllocate.ObjToInt(), - TaskStatus = TaskStatusEnum.New.ObjToInt(), - WarehouseId = stockInfo.WarehouseId, - PalletType = stockInfo.PalletType, - MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode, - Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity, - }; - _unitOfWorkManage.BeginTran(); - BaseDal.AddData(newTask); - PushTasksToWCS(new List<Dt_Task> { newTask }); - _unitOfWorkManage.CommitTran(); - return WebResponseContent.Instance.OK(); - } - catch (Exception ex) - { - _unitOfWorkManage.RollbackTran(); - return WebResponseContent.Instance.Error(ex.Message); - } - } - /// <summary> /// 鎴愬搧浠撳叆搴撲换鍔″畬鎴� /// </summary> -- Gitblit v1.9.3