diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCheckstockH.part.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCheckstockH.part.cs
new file mode 100644
index 00000000..c039170e
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsCheckstockH.part.cs
@@ -0,0 +1,17 @@
+using JNPF.Common.Contracts;
+using JNPF.Common.Security;
+using SqlSugar;
+
+namespace Tnb.WarehouseMgr.Entities;
+
+///
+/// 盘点任务主表
+///
+public partial class WmsCheckstockH : BaseEntity
+{
+ ///
+ /// 仓库名称
+ ///
+ [SugarColumn(IsIgnore =true)]
+ public string warehouse_name { get; set; }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
index 88a86f13..5cc5d655 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
@@ -370,6 +370,7 @@ namespace Tnb.WarehouseMgr
await db.Ado.BeginTranAsync();
List endPointIds = disTasks.Where(t => t.area_code.StartsWith("ELE", StringComparison.OrdinalIgnoreCase)).Select(t => t.endpoint_id).ToList();
+ Logger.Information($"endPointIds:{string.Join(",", endPointIds)}");
if (endPointIds?.Count > 0)
{
elevatorList = elevatorList.FindAll(x => endPointIds.Contains(x.point_id));
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs
index f31161e9..5a870070 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs
@@ -42,6 +42,7 @@ namespace Tnb.WarehouseMgr
private readonly IVisualDevService _visualDevService;
private readonly IRunService _runService;
private readonly IBillRullService _billRullService;
+ private readonly IDictionaryDataService _dataService;
private static Dictionary _carryMap = new();
public WmsCheckTaskService(
@@ -51,6 +52,7 @@ namespace Tnb.WarehouseMgr
IRunService runService,
IBillRullService billRullService,
IUserManager userManager,
+ IDictionaryDataService dataService,
IEventPublisher eventPublisher
)
{
@@ -59,6 +61,7 @@ namespace Tnb.WarehouseMgr
_visualDevService = visualDevService;
_runService = runService;
_billRullService = billRullService;
+ _dataService = dataService;
_userManager = userManager;
OverideFuncs.CreateAsync = Create;
@@ -421,9 +424,17 @@ namespace Tnb.WarehouseMgr
[HttpGet("{carryCode}")]
public async Task GetCheckTaskInfo(string carryCode)
{
+ var checkTypeMap = await _dataService.GetDicByKey("CheckType");
+ var checkSpeciesMap = await _dataService.GetDicByKey("CheckSpecies");
var result = await _db.Queryable().InnerJoin((a, b) => a.require_id == b.id)
- .Where((a, b) => a.carry_code == carryCode)
- .Select()
+ .InnerJoin((a, b, c) => b.warehouse_id == c.id)
+ .Where(a => a.carry_code == carryCode)
+ .Select((a, b, c) => new WmsCheckstockH { warehouse_name = c.whname }, true)
+ .Mapper(it =>
+ {
+ it.checkstock_type = checkTypeMap.ContainsKey(it.checkstock_type!) ? checkTypeMap[it.checkstock_type!]?.ToString() ?? "" : "";
+ it.handle_kinds = checkTypeMap.ContainsKey(it.handle_kinds!) ? checkTypeMap[it.handle_kinds!]?.ToString() ?? "" : "";
+ })
.ToListAsync();
return result;
}
@@ -569,7 +580,7 @@ namespace Tnb.WarehouseMgr
csCode.checkstock_d_id = checkStockDMap.ContainsKey($"{csCode.carry_id}{csCode.material_id}{csCode.code_batch}") ? checkStockDMap[$"{csCode.carry_id}{csCode.material_id}{csCode.code_batch}"] : "";
}
//插入 盘点code表
- await _db.Insertable(checkStockCodes).ExecuteCommandAsync();
+ _ = await _db.Insertable(checkStockCodes).ExecuteCommandAsync();
var detailIds = checkStockCodes.Select(x => x.checkstock_d_id).ToList();
var checkStockDs = await _db.Queryable().Where(it => detailIds.Contains(it.id)).ToListAsync();
foreach (var csd in checkStockDs)
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs
index 37d9f22b..86e185a3 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsDeliveryService.cs
@@ -148,7 +148,9 @@ namespace Tnb.WarehouseMgr
org_id = _userManager.User.OrganizeId,
startlocation_id = sPoint?.location_id!,
startlocation_code = sPoint?.location_code!,
+ startpoint_id = sPoint?.id,
startpoint_code = sPoint?.point_code,
+ endpoint_id = ePoint?.id,
endpoint_code = ePoint?.point_code,
endlocation_id = ePoint?.location_id!,
endlocation_code = ePoint?.location_code!,