diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ArtificialInstock.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ArtificialInstock.cs
index 481fbf1d..afd656b4 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ArtificialInstock.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ArtificialInstock.cs
@@ -13,5 +13,6 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
public string? create_id { get; set; }
public string? carry_code { get; set; }
public string? startlocation_code { get; set; }
+ public string? warehouse_id { get; set; }
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialByCarryInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialByCarryInput.cs
new file mode 100644
index 00000000..f4a07369
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialByCarryInput.cs
@@ -0,0 +1,10 @@
+namespace Tnb.WarehouseMgr.Entities.Dto
+{
+ ///
+ /// 库房业务更新输入参数
+ ///
+ public class MaterialByCarryInput
+ {
+ public string carry_code { get; set; }
+ }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsArtificialInstockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsArtificialInstockService.cs
index 2159b2fd..0afb16fd 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsArtificialInstockService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsArtificialInstockService.cs
@@ -101,7 +101,7 @@ namespace Tnb.WarehouseMgr
throw new Exception($"托盘{wmsCarryH.carry_code}在存储库位中,不能绑定!");
}
- switch (startlocationn.wh_id)
+ switch (input.warehouse_id)
{
case WmsWareHouseConst.WAREHOUSE_YCL_ID:
{
@@ -133,7 +133,7 @@ namespace Tnb.WarehouseMgr
wmsArtificialInstock.create_time = DateTime.Now;
wmsArtificialInstock.location_id = startlocationn.id;
wmsArtificialInstock.location_code = startlocationn.location_code;
- wmsArtificialInstock.warehouse_id = startlocationn.wh_id;
+ wmsArtificialInstock.warehouse_id = input.warehouse_id;
await _db.Insertable(wmsArtificialInstock).ExecuteCommandAsync();
}
else
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryService.cs
index 75e6715b..e5b67f20 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryService.cs
@@ -15,6 +15,7 @@ using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
+using Newtonsoft.Json.Linq;
using Npgsql;
using SqlSugar;
using Tnb.BasicData.Entities;
@@ -355,5 +356,38 @@ namespace Tnb.WarehouseMgr
}
}
+ ///
+ /// 根据载具获取物料
+ ///
+ ///
+ ///
+ ///
+
+ [HttpPost, NonUnify, AllowAnonymous]
+ public async Task MaterialByCarry(MaterialByCarryInput input)
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(input.carry_code))
+ {
+ throw new AppFriendlyException($"【MaterialByCarry】托盘编码不能为空", 500);
+ }
+
+ WmsCarryH wmsCarryH = await _db.Queryable().Where(r => r.carry_code == input.carry_code).FirstAsync();
+ if (wmsCarryH == null)
+ {
+ throw new AppFriendlyException($"【MaterialByCarry】托盘{input.carry_code}不存在", 500);
+ }
+
+ List wmsCarryCodes = _db.Queryable().Where(r => r.carry_id == wmsCarryH.id).ToList();
+
+ return await ToApiResult(HttpStatusCode.OK, "成功", wmsCarryCodes);
+ }
+ catch (Exception ex)
+ {
+ await _db.Ado.RollbackTranAsync();
+ return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/apihost/Tnb.API.Entry/Configurations/AgvRequestCfgUrl.json b/apihost/Tnb.API.Entry/Configurations/AgvRequestCfgUrl.json
index 697ba175..a15fe34b 100644
--- a/apihost/Tnb.API.Entry/Configurations/AgvRequestCfgUrl.json
+++ b/apihost/Tnb.API.Entry/Configurations/AgvRequestCfgUrl.json
@@ -1,6 +1,6 @@
{
"AgvRequestUrls": {
- "CreateTaskChainUrl": "http://10.147.19.104:5013/api/task-chain/create",
+ "CreateTaskChainUrl": "http://192.168.11.104:1880/api/task-chain/create",
"CancelTaskChainUrl": "http://192.168.11.104:1880/api/task-chain/cancel"
}
}
\ No newline at end of file