From b25aca740ab7890ab2f75b1b3880228d1e7d0144 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 26 Jun 2023 16:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BD=90=E5=A5=97=E5=88=86?= =?UTF-8?q?=E6=8B=A3=E6=A8=A1=E5=9D=97=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Tnb.PerMgr/Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Tnb.QcMgr/Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Tnb.WarehouseMgr/WmsOutStockService.cs | 11 +- .../Tnb.WarehouseMgr/WmsSetSortingService.cs | 145 +++++++++--------- .../Properties/launchSettings.json | 12 ++ app/Tnb.Apps/Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Tnb.Common/Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Tnb.OAuth/Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ .../Properties/launchSettings.json | 12 ++ 43 files changed, 571 insertions(+), 77 deletions(-) create mode 100644 BasicData/Tnb.BasicData.Entities/Properties/launchSettings.json create mode 100644 BasicData/Tnb.BasicData.Interfaces/Properties/launchSettings.json create mode 100644 BasicData/Tnb.BasicData/Properties/launchSettings.json create mode 100644 EquipMgr/Tnb.EquipMgr.Entities/Properties/launchSettings.json create mode 100644 EquipMgr/Tnb.EquipMgr.Interfaces/Properties/launchSettings.json create mode 100644 EquipMgr/Tnb.EquipMgr/Properties/launchSettings.json create mode 100644 PerMgr/Tnb.PerMgr.Entities/Properties/launchSettings.json create mode 100644 PerMgr/Tnb.PerMgr.Interfaces/Properties/launchSettings.json create mode 100644 PerMgr/Tnb.PerMgr/Properties/launchSettings.json create mode 100644 ProductionMgr/Tnb.ProductionMgr.Entities/Properties/launchSettings.json create mode 100644 ProductionMgr/Tnb.ProductionMgr.Interfaces/Properties/launchSettings.json create mode 100644 ProductionMgr/Tnb.ProductionMgr/Properties/launchSettings.json create mode 100644 QcMgr/Tnb.QcMgr.Entities/Properties/launchSettings.json create mode 100644 QcMgr/Tnb.QcMgr.Interfaces/Properties/launchSettings.json create mode 100644 QcMgr/Tnb.QcMgr/Properties/launchSettings.json create mode 100644 WarehouseMgr/Tnb.WarehouseMgr.Entities/Properties/launchSettings.json create mode 100644 WarehouseMgr/Tnb.WarehouseMgr.Interfaces/Properties/launchSettings.json create mode 100644 app/Tnb.Apps.Interfaces/Properties/launchSettings.json create mode 100644 app/Tnb.Apps/Properties/launchSettings.json create mode 100644 common/Tnb.CollectiveOAuth/Properties/launchSettings.json create mode 100644 common/Tnb.Common.Core/Properties/launchSettings.json create mode 100644 common/Tnb.Common/Properties/launchSettings.json create mode 100644 common/Tnb.SqlSugar/Properties/launchSettings.json create mode 100644 common/Tnb.Thirdparty/Properties/launchSettings.json create mode 100644 common/Tnb.WebSockets/Properties/launchSettings.json create mode 100644 extend/Tnb.Extend.Entitys/Properties/launchSettings.json create mode 100644 extend/Tnb.Extend.Interfaces/Properties/launchSettings.json create mode 100644 message/Tnb.Message.Entitys/Properties/launchSettings.json create mode 100644 message/Tnb.Message.Interfaces/Properties/launchSettings.json create mode 100644 message/Tnb.Message/Properties/launchSettings.json create mode 100644 system/Tnb.OAuth/Properties/launchSettings.json create mode 100644 system/Tnb.Systems.Entitys/Properties/launchSettings.json create mode 100644 taskschedule/Tnb.TaskScheduler.Entitys/Properties/launchSettings.json create mode 100644 taskschedule/Tnb.TaskScheduler.Interfaces/Properties/launchSettings.json create mode 100644 taskschedule/Tnb.TaskScheduler/Properties/launchSettings.json create mode 100644 visualdev/Tnb.VisualDev.Engine/Properties/launchSettings.json create mode 100644 visualdev/Tnb.VisualDev.Entitys/Properties/launchSettings.json create mode 100644 visualdev/Tnb.VisualDev.Interfaces/Properties/launchSettings.json create mode 100644 visualdev/Tnb.VisualDev/Properties/launchSettings.json create mode 100644 workflow/Tnb.WorkFlow.Entitys/Properties/launchSettings.json create mode 100644 workflow/Tnb.WorkFlow.Interfaces/Properties/launchSettings.json diff --git a/BasicData/Tnb.BasicData.Entities/Properties/launchSettings.json b/BasicData/Tnb.BasicData.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..60bc7990 --- /dev/null +++ b/BasicData/Tnb.BasicData.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.BasicData.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50313;http://localhost:50314" + } + } +} \ No newline at end of file diff --git a/BasicData/Tnb.BasicData.Interfaces/Properties/launchSettings.json b/BasicData/Tnb.BasicData.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..1fcc5282 --- /dev/null +++ b/BasicData/Tnb.BasicData.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.BasicData.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50305;http://localhost:50306" + } + } +} \ No newline at end of file diff --git a/BasicData/Tnb.BasicData/Properties/launchSettings.json b/BasicData/Tnb.BasicData/Properties/launchSettings.json new file mode 100644 index 00000000..058fd70e --- /dev/null +++ b/BasicData/Tnb.BasicData/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.BasicData": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50307;http://localhost:50308" + } + } +} \ No newline at end of file diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Properties/launchSettings.json b/EquipMgr/Tnb.EquipMgr.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..0685298d --- /dev/null +++ b/EquipMgr/Tnb.EquipMgr.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.EquipMgr.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50299;http://localhost:50300" + } + } +} \ No newline at end of file diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/Properties/launchSettings.json b/EquipMgr/Tnb.EquipMgr.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..f4a42f30 --- /dev/null +++ b/EquipMgr/Tnb.EquipMgr.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.EquipMgr.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50303;http://localhost:50304" + } + } +} \ No newline at end of file diff --git a/EquipMgr/Tnb.EquipMgr/Properties/launchSettings.json b/EquipMgr/Tnb.EquipMgr/Properties/launchSettings.json new file mode 100644 index 00000000..52e54340 --- /dev/null +++ b/EquipMgr/Tnb.EquipMgr/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.EquipMgr": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50301;http://localhost:50302" + } + } +} \ No newline at end of file diff --git a/PerMgr/Tnb.PerMgr.Entities/Properties/launchSettings.json b/PerMgr/Tnb.PerMgr.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..54c1b4f2 --- /dev/null +++ b/PerMgr/Tnb.PerMgr.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.PerMgr.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50319;http://localhost:50320" + } + } +} \ No newline at end of file diff --git a/PerMgr/Tnb.PerMgr.Interfaces/Properties/launchSettings.json b/PerMgr/Tnb.PerMgr.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..4967ac13 --- /dev/null +++ b/PerMgr/Tnb.PerMgr.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.PerMgr.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50321;http://localhost:50322" + } + } +} \ No newline at end of file diff --git a/PerMgr/Tnb.PerMgr/Properties/launchSettings.json b/PerMgr/Tnb.PerMgr/Properties/launchSettings.json new file mode 100644 index 00000000..6d85c6dd --- /dev/null +++ b/PerMgr/Tnb.PerMgr/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.PerMgr": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50317;http://localhost:50318" + } + } +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Properties/launchSettings.json b/ProductionMgr/Tnb.ProductionMgr.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..a4a524d7 --- /dev/null +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.ProductionMgr.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50311;http://localhost:50312" + } + } +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr.Interfaces/Properties/launchSettings.json b/ProductionMgr/Tnb.ProductionMgr.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..4dc4edc8 --- /dev/null +++ b/ProductionMgr/Tnb.ProductionMgr.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.ProductionMgr.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50315;http://localhost:50316" + } + } +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/Properties/launchSettings.json b/ProductionMgr/Tnb.ProductionMgr/Properties/launchSettings.json new file mode 100644 index 00000000..cce9bdec --- /dev/null +++ b/ProductionMgr/Tnb.ProductionMgr/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.ProductionMgr": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50309;http://localhost:50310" + } + } +} \ No newline at end of file diff --git a/QcMgr/Tnb.QcMgr.Entities/Properties/launchSettings.json b/QcMgr/Tnb.QcMgr.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..a45ccc61 --- /dev/null +++ b/QcMgr/Tnb.QcMgr.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.QcMgr.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50295;http://localhost:50296" + } + } +} \ No newline at end of file diff --git a/QcMgr/Tnb.QcMgr.Interfaces/Properties/launchSettings.json b/QcMgr/Tnb.QcMgr.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..5f71dd6e --- /dev/null +++ b/QcMgr/Tnb.QcMgr.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.QcMgr.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50297;http://localhost:50298" + } + } +} \ No newline at end of file diff --git a/QcMgr/Tnb.QcMgr/Properties/launchSettings.json b/QcMgr/Tnb.QcMgr/Properties/launchSettings.json new file mode 100644 index 00000000..e8f5d84b --- /dev/null +++ b/QcMgr/Tnb.QcMgr/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.QcMgr": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50291;http://localhost:50292" + } + } +} \ No newline at end of file diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Properties/launchSettings.json b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Properties/launchSettings.json new file mode 100644 index 00000000..190e0f72 --- /dev/null +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.WarehouseMgr.Entities": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50287;http://localhost:50288" + } + } +} \ No newline at end of file diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/Properties/launchSettings.json b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..e52cdd23 --- /dev/null +++ b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.WarehouseMgr.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50293;http://localhost:50294" + } + } +} \ No newline at end of file diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs index bc14c2ee..a216fa8c 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs @@ -95,11 +95,10 @@ namespace Tnb.WarehouseMgr throw new AppFriendlyException($"需要出库[{os.pr_qty}],实际库存{codeQty},数量不足", 500); } var partCarryMats = carryCodesPart.Adapt>(); - partCarryMats.ForEach(x => + for (int i = 0; i < partCarryMats.Count; i++) { - x.need_qty = (int)os.pr_qty; - x.real_qty = codeQty; - }); + partCarryMats[i].need_qty = carryCodesPart[i].codeqty; + } carryMats.AddRange(partCarryMats); } } @@ -110,12 +109,12 @@ namespace Tnb.WarehouseMgr .Select(x => { WmsCarryMat? carryMat = x.FirstOrDefault()!; - carryMat.real_qty = x.Sum(d => d.real_qty); + carryMat.need_qty = x.Sum(d => d.need_qty); return carryMat; }) .ToList(); await _db.Insertable(carryMats).ExecuteCommandAsync(); - var dic = carryMats.DistinctBy(x => x.carry_id).ToDictionary(x => x.carry_id, x => x.real_qty); + var dic = carryMats.DistinctBy(x => x.carry_id).ToDictionary(x => x.carry_id, x => x.need_qty); var allOutIds = new List(); var sortingOutIds = new List(); foreach (var pair in dic) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs index 0f6d0547..7f789ccc 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsSetSortingService.cs @@ -87,93 +87,42 @@ namespace Tnb.WarehouseMgr if (carryMats.Count > 0) { carryMats.ForEach(x => x.id = SnowflakeIdHelper.NextId()); + for (int i = 0; i < partCarryMats.Count; i++) + { + partCarryMats[i].need_qty = carryCodesPart[i].codeqty; + } carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch }) .Select(x => { WmsCarryMat? carryMat = x.FirstOrDefault()!; - carryMat.real_qty = x.Sum(d => d.real_qty); + carryMat.need_qty = x.Sum(d => d.need_qty); return carryMat; }) .ToList(); await _db.Insertable(carryMats).ExecuteCommandAsync(); var dic = carryMats.DistinctBy(x => x.carry_id).ToDictionary(x => x.carry_id, x => x.real_qty); - var allOutIds = new List(); - var sortingOutIds = new List(); - foreach (var pair in dic) - { - var codes = carryCodes.FindAll(x => x.carry_id == pair.Key); - if (codes?.Count > 0) - { - if (pair.Value == codes.Sum(d => d.codeqty)) - { - allOutIds.Add(pair.Key); - } - else - { - sortingOutIds.Add(pair.Key); - } - } - } - carryIds = allOutIds.Concat(sortingOutIds).ToList(); - await _db.Updateable().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.全部出).ToString() }).Where(it => allOutIds.Contains(it.id)).ExecuteCommandAsync(); + + carryIds = carryMats.Select(x => x.carry_id).Distinct().ToList(); + await _db.Updateable().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.全部出).ToString() }).Where(it => carryIds.Contains(it.id)).ExecuteCommandAsync(); //天益项目不需要 //await _db.Updateable().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.分拣出).ToString() }).Where(it => sortingOutIds.Contains(it.id)).ExecuteCommandAsync(); } - var carrys = await _db.Queryable().Where(it => carryIds.Contains(it.id)).ToListAsync(); - if (carrys?.Count > 0) + var carrys = await _db.Queryable().Where(it => carryIds.Contains(it.id)).ToArrayAsync(); + if (carrys?.Length > 0) { List preTasks = new(); List locIds = new(); - foreach (var carry in carrys) + string firstLocationId = "27010980724501", secondLocationId = "27010987857941"; + if (carrys.Length > 6) { - WmsPointH sPoint = await _db.Queryable().FirstAsync(it => it.location_id == carry.location_id); - WmsPointH ePoint = null!; - - //ePoint = await _db.Queryable().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString()); - - if (sPoint != null && ePoint != null) - { - var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id); - locIds.AddRange(points.Select(x => x.location_id).ToList()!); - //根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序) - if (points?.Count > 0) - { - if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500); - var curPreTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it => - { - var sPoint = it.FirstOrDefault(); - var ePoint = it.LastOrDefault(); - - WmsPretaskH preTask = new(); - preTask.org_id = _userManager.User.OrganizeId; - preTask.startlocation_id = sPoint?.location_id!; - preTask.startlocation_code = sPoint?.location_code!; - preTask.endlocation_id = ePoint?.location_id!; - preTask.endlocation_code = ePoint?.location_code!; - preTask.start_floor = sPoint?.floor.ToString(); - preTask.end_floor = ePoint?.floor.ToString(); - preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(); - preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID; - preTask.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID; - preTask.task_type = WmsWareHouseConst.WMS_PRETASK_OUTSTOCK_TYPE_ID; - preTask.carry_id = carry.id; - preTask.carry_code = carry.carry_code; - preTask.area_id = sPoint?.area_id!; - preTask.area_code = it.Key; - preTask.require_id = ""; - preTask.require_code = ""; - preTask.create_id = _userManager.UserId; - preTask.create_time = DateTime.Now; - return preTask; - }).ToList(); - //if (loc.is_sign == 0) - //{ - // curPreTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值 - //} - preTasks.AddRange(curPreTasks); - - } - } + var leftCarrys = carrys[..6]; + var rightCarrys = carrys[6..]; + await _genPreTask(leftCarrys, locIds, firstLocationId, preTasks); + await _genPreTask(rightCarrys, locIds, secondLocationId, preTasks); + } + else + { + await _genPreTask(carrys, locIds, firstLocationId, preTasks); } var isOk = await _wareHouseService.GenPreTask(preTasks, null); GenPreTaskUpInput genPreTaskAfterUpInput = new(); @@ -186,5 +135,59 @@ namespace Tnb.WarehouseMgr } } + private async Task _genPreTask(WmsCarryH[] carrys, List locIds, string eLocationId, List preTasks) + { + var loc = await _db.Queryable().SingleAsync(it => it.id == eLocationId); + foreach (var carry in carrys) + { + WmsPointH sPoint = await _db.Queryable().FirstAsync(it => it.location_id == carry.location_id); + WmsPointH ePoint = await _db.Queryable().FirstAsync(it => it.location_id == eLocationId); + + if (sPoint != null && ePoint != null) + { + var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id); + locIds.AddRange(points.Select(x => x.location_id).ToList()!); + //根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序) + if (points?.Count > 0) + { + if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500); + var curPreTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it => + { + var sPoint = it.FirstOrDefault(); + var ePoint = it.LastOrDefault(); + + WmsPretaskH preTask = new(); + preTask.org_id = _userManager.User.OrganizeId; + preTask.startlocation_id = sPoint?.location_id!; + preTask.startlocation_code = sPoint?.location_code!; + preTask.endlocation_id = ePoint?.location_id!; + preTask.endlocation_code = ePoint?.location_code!; + preTask.start_floor = sPoint?.floor.ToString(); + preTask.end_floor = ePoint?.floor.ToString(); + preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(); + preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID; + preTask.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID; + preTask.task_type = WmsWareHouseConst.WMS_PRETASK_OUTSTOCK_TYPE_ID; + preTask.carry_id = carry.id; + preTask.carry_code = carry.carry_code; + preTask.area_id = sPoint?.area_id!; + preTask.area_code = it.Key; + preTask.require_id = ""; + preTask.require_code = ""; + preTask.create_id = _userManager.UserId; + preTask.create_time = DateTime.Now; + return preTask; + }).ToList(); + if (loc.is_sign == 0) + { + curPreTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值 + } + preTasks.AddRange(curPreTasks); + + } + } + } + } + } } diff --git a/app/Tnb.Apps.Interfaces/Properties/launchSettings.json b/app/Tnb.Apps.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..c8996f68 --- /dev/null +++ b/app/Tnb.Apps.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Apps.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50247;http://localhost:50263" + } + } +} \ No newline at end of file diff --git a/app/Tnb.Apps/Properties/launchSettings.json b/app/Tnb.Apps/Properties/launchSettings.json new file mode 100644 index 00000000..a07fb231 --- /dev/null +++ b/app/Tnb.Apps/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Apps": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50240;http://localhost:50264" + } + } +} \ No newline at end of file diff --git a/common/Tnb.CollectiveOAuth/Properties/launchSettings.json b/common/Tnb.CollectiveOAuth/Properties/launchSettings.json new file mode 100644 index 00000000..67b55152 --- /dev/null +++ b/common/Tnb.CollectiveOAuth/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.CollectiveOAuth": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50269;http://localhost:50270" + } + } +} \ No newline at end of file diff --git a/common/Tnb.Common.Core/Properties/launchSettings.json b/common/Tnb.Common.Core/Properties/launchSettings.json new file mode 100644 index 00000000..8467993c --- /dev/null +++ b/common/Tnb.Common.Core/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Common.Core": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50271;http://localhost:50273" + } + } +} \ No newline at end of file diff --git a/common/Tnb.Common/Properties/launchSettings.json b/common/Tnb.Common/Properties/launchSettings.json new file mode 100644 index 00000000..38603b70 --- /dev/null +++ b/common/Tnb.Common/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Common": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50246;http://localhost:50267" + } + } +} \ No newline at end of file diff --git a/common/Tnb.SqlSugar/Properties/launchSettings.json b/common/Tnb.SqlSugar/Properties/launchSettings.json new file mode 100644 index 00000000..ce32dbb9 --- /dev/null +++ b/common/Tnb.SqlSugar/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.SqlSugar": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50289;http://localhost:50290" + } + } +} \ No newline at end of file diff --git a/common/Tnb.Thirdparty/Properties/launchSettings.json b/common/Tnb.Thirdparty/Properties/launchSettings.json new file mode 100644 index 00000000..b2a75244 --- /dev/null +++ b/common/Tnb.Thirdparty/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Thirdparty": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50276;http://localhost:50277" + } + } +} \ No newline at end of file diff --git a/common/Tnb.WebSockets/Properties/launchSettings.json b/common/Tnb.WebSockets/Properties/launchSettings.json new file mode 100644 index 00000000..c89e7e57 --- /dev/null +++ b/common/Tnb.WebSockets/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.WebSockets": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50272;http://localhost:50274" + } + } +} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Properties/launchSettings.json b/extend/Tnb.Extend.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..dca0860f --- /dev/null +++ b/extend/Tnb.Extend.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Extend.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50285;http://localhost:50286" + } + } +} \ No newline at end of file diff --git a/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json b/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..77266e9a --- /dev/null +++ b/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Extend.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50283;http://localhost:50284" + } + } +} \ No newline at end of file diff --git a/message/Tnb.Message.Entitys/Properties/launchSettings.json b/message/Tnb.Message.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..31331cbf --- /dev/null +++ b/message/Tnb.Message.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Message.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50244;http://localhost:50268" + } + } +} \ No newline at end of file diff --git a/message/Tnb.Message.Interfaces/Properties/launchSettings.json b/message/Tnb.Message.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..6f24c200 --- /dev/null +++ b/message/Tnb.Message.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Message.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50239;http://localhost:50259" + } + } +} \ No newline at end of file diff --git a/message/Tnb.Message/Properties/launchSettings.json b/message/Tnb.Message/Properties/launchSettings.json new file mode 100644 index 00000000..3aff95b9 --- /dev/null +++ b/message/Tnb.Message/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Message": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50241;http://localhost:50262" + } + } +} \ No newline at end of file diff --git a/system/Tnb.OAuth/Properties/launchSettings.json b/system/Tnb.OAuth/Properties/launchSettings.json new file mode 100644 index 00000000..c7a7206a --- /dev/null +++ b/system/Tnb.OAuth/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.OAuth": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50278;http://localhost:50279" + } + } +} \ No newline at end of file diff --git a/system/Tnb.Systems.Entitys/Properties/launchSettings.json b/system/Tnb.Systems.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..c69f89f2 --- /dev/null +++ b/system/Tnb.Systems.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.Systems.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50280;http://localhost:50281" + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler.Entitys/Properties/launchSettings.json b/taskschedule/Tnb.TaskScheduler.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..842c1c8a --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.TaskScheduler.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50245;http://localhost:50257" + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler.Interfaces/Properties/launchSettings.json b/taskschedule/Tnb.TaskScheduler.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..4d593874 --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.TaskScheduler.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50251;http://localhost:50258" + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler/Properties/launchSettings.json b/taskschedule/Tnb.TaskScheduler/Properties/launchSettings.json new file mode 100644 index 00000000..523f2c0b --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.TaskScheduler": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50250;http://localhost:50255" + } + } +} \ No newline at end of file diff --git a/visualdev/Tnb.VisualDev.Engine/Properties/launchSettings.json b/visualdev/Tnb.VisualDev.Engine/Properties/launchSettings.json new file mode 100644 index 00000000..6bf841cb --- /dev/null +++ b/visualdev/Tnb.VisualDev.Engine/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.VisualDev.Engine": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50248;http://localhost:50254" + } + } +} \ No newline at end of file diff --git a/visualdev/Tnb.VisualDev.Entitys/Properties/launchSettings.json b/visualdev/Tnb.VisualDev.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..6b871025 --- /dev/null +++ b/visualdev/Tnb.VisualDev.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.VisualDev.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50243;http://localhost:50260" + } + } +} \ No newline at end of file diff --git a/visualdev/Tnb.VisualDev.Interfaces/Properties/launchSettings.json b/visualdev/Tnb.VisualDev.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..a65fcf0f --- /dev/null +++ b/visualdev/Tnb.VisualDev.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.VisualDev.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50252;http://localhost:50256" + } + } +} \ No newline at end of file diff --git a/visualdev/Tnb.VisualDev/Properties/launchSettings.json b/visualdev/Tnb.VisualDev/Properties/launchSettings.json new file mode 100644 index 00000000..698c0500 --- /dev/null +++ b/visualdev/Tnb.VisualDev/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.VisualDev": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50242;http://localhost:50266" + } + } +} \ No newline at end of file diff --git a/workflow/Tnb.WorkFlow.Entitys/Properties/launchSettings.json b/workflow/Tnb.WorkFlow.Entitys/Properties/launchSettings.json new file mode 100644 index 00000000..46607c9d --- /dev/null +++ b/workflow/Tnb.WorkFlow.Entitys/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.WorkFlow.Entitys": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50253;http://localhost:50261" + } + } +} \ No newline at end of file diff --git a/workflow/Tnb.WorkFlow.Interfaces/Properties/launchSettings.json b/workflow/Tnb.WorkFlow.Interfaces/Properties/launchSettings.json new file mode 100644 index 00000000..0d35553b --- /dev/null +++ b/workflow/Tnb.WorkFlow.Interfaces/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Tnb.WorkFlow.Interfaces": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50249;http://localhost:50265" + } + } +} \ No newline at end of file