修改委外发货物料id和编码获取错误
This commit is contained in:
@@ -339,6 +339,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
||||||
foreach (WmsOutsourceD item in dList)
|
foreach (WmsOutsourceD item in dList)
|
||||||
{
|
{
|
||||||
|
//由于框架有bug,导致无法获取到物料的id,只能获取到物料的编号,所以暂时手动通过物料编码查找物料id, --2024-10-16
|
||||||
|
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().Where(x => x.code == item.matcode && x.deleted==null).FirstAsync();
|
||||||
|
|
||||||
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
["castunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == item.unit_id || x.Id == item.unit_id)?.Id ?? ""))?.cunitid,
|
["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"] = null,
|
||||||
["pk_arriveorder_b"] = null,
|
["pk_arriveorder_b"] = null,
|
||||||
["pk_group"] = erpOrg.pk_group,
|
["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"] = wmsOutsourceOrderH?.erp_pk,
|
||||||
["pk_order_b"] = item.erp_outsource_order_d_pk,
|
["pk_order_b"] = item.erp_outsource_order_d_pk,
|
||||||
["pk_org"] = erpOrg.pk_org,
|
["pk_org"] = erpOrg.pk_org,
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
"DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite;
|
"DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite;
|
||||||
//"Host": "192.168.11.109",
|
//"Host": "192.168.11.109",
|
||||||
"Host": "127.0.0.1",
|
"Host": "127.0.0.1",
|
||||||
"Port": "5432",
|
"Port": "5431",
|
||||||
//"DBName": "tianyi_db",
|
//"DBName": "tianyi_db",
|
||||||
//"UserName": "postgres",
|
//"UserName": "postgres",
|
||||||
//"Password": "pass@word123",
|
//"Password": "pass@word123",
|
||||||
"DBName": "tianyi",
|
"DBName": "tianyi",
|
||||||
"UserName": "postgres",
|
"UserName": "totong",
|
||||||
"Password": "pass@word123",
|
"Password": "IPANyxGSKxIXg0dBM",
|
||||||
//SqlServer
|
//SqlServer
|
||||||
//"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true"
|
//"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true"
|
||||||
//Kdbndp
|
//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"
|
//"DefaultConnection": "server={0};port={1};database={2};uid={3};pwd={4};sslmode=none;pooling=true;charset=utf8mb4;allowLoadLocalInfile=true;allowPublicKeyRetrieval=true"
|
||||||
"ConfigList": [
|
"ConfigList": [
|
||||||
{
|
{
|
||||||
"ServiceName":"erpdb",
|
"ServiceName": "erpdb",
|
||||||
"dbType":"Oracle",
|
"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"
|
"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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user