From c81eaa0357d51b1ee3342e401f37f8a75888cb7a Mon Sep 17 00:00:00 2001 From: 10840 <10840@CHENWENKAI> Date: Wed, 16 Oct 2024 13:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A7=94=E5=A4=96=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E7=89=A9=E6=96=99id=E5=92=8C=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs | 7 ++++++- .../Configurations/ConnectionStrings.json | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs index ae374217..4157fed9 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceService.cs @@ -339,6 +339,9 @@ namespace Tnb.WarehouseMgr List> erpRequestDataDetails = new List>(); foreach (WmsOutsourceD item in dList) { + //由于框架有bug,导致无法获取到物料的id,只能获取到物料的编号,所以暂时手动通过物料编码查找物料id, --2024-10-16 + BasMaterial basMaterial = await _db.Queryable().Where(x => x.code == item.matcode && x.deleted==null).FirstAsync(); + erpRequestDataDetails.Add(new Dictionary() { ["castunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id || x.Id == item.unit_id)?.Id ?? ""))?.cunitid, @@ -366,7 +369,9 @@ namespace Tnb.WarehouseMgr ["pk_arriveorder"] = null, ["pk_arriveorder_b"] = null, ["pk_group"] = erpOrg.pk_group, - ["pk_material"] = erpExtendFields.Find(x => x.table_id == item.matcode_id)?.cmaterialoid, + //由于框架有bug,导致无法获取到物料的id,只能获取到物料的编号,所以暂时手动通过物料编码查找物料id, --2024-10-16 + //["pk_material"] = erpExtendFields.Find(x => x.table_id == item.matcode_id)?.cmaterialoid, + ["pk_material"] = basMaterial == null ? null : erpExtendFields.Find(x => x.table_id == basMaterial.id)?.cmaterialoid, ["pk_order"] = wmsOutsourceOrderH?.erp_pk, ["pk_order_b"] = item.erp_outsource_order_d_pk, ["pk_org"] = erpOrg.pk_org, diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index 7e076272..18b5adad 100644 --- a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json +++ b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json @@ -4,13 +4,13 @@ "DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite; //"Host": "192.168.11.109", "Host": "127.0.0.1", - "Port": "5432", + "Port": "5431", //"DBName": "tianyi_db", //"UserName": "postgres", //"Password": "pass@word123", "DBName": "tianyi", - "UserName": "postgres", - "Password": "pass@word123", + "UserName": "totong", + "Password": "IPANyxGSKxIXg0dBM", //SqlServer //"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true" //Kdbndp @@ -25,9 +25,9 @@ //"DefaultConnection": "server={0};port={1};database={2};uid={3};pwd={4};sslmode=none;pooling=true;charset=utf8mb4;allowLoadLocalInfile=true;allowPublicKeyRetrieval=true" "ConfigList": [ { - "ServiceName":"erpdb", - "dbType":"Oracle", - "connectionStr":"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.188)(PORT=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME=orcl)));User Id=BIP01;Password=BIP01" + "ServiceName": "erpdb", + "dbType": "Oracle", + "connectionStr": "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.188)(PORT=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME=orcl)));User Id=BIP01;Password=BIP01" } ] }