From 6aae58644d6590b9c363ef6e11c3db4ea1e89f48 Mon Sep 17 00:00:00 2001 From: chenwenkai <1084072318@qq.com> Date: Fri, 25 Oct 2024 16:56:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?bip=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B0=E8=B4=A7=E4=BA=A4=E6=98=93=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs | 8 ++++---- WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs index d397bc09..05b79145 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutsourceDService.cs @@ -250,9 +250,9 @@ namespace Tnb.WarehouseMgr #region erpRequestData.Add("billmaker", erpCreateId);//制单人 erpRequestData.Add("cbizid", erpOrg?.person_id ?? null);//业务员 - erpRequestData.Add("cbiztype", wmsOutsourceH?.transaction_type ?? null);//业务流程 - erpRequestData.Add("cdptid", erpOrg?.cdptid ?? null);//部门id - erpRequestData.Add("cdptvid", erpOrg?.cdptvid ?? null);//部门vid + erpRequestData.Add("cbiztype", null);//业务流程 + erpRequestData.Add("cdptid", erpOrg != null ? (string.IsNullOrEmpty(erpOrg.cdptid) ? null : erpOrg.cdptid) : null);//部门id + erpRequestData.Add("cdptvid", erpOrg != null ? (string.IsNullOrEmpty(erpOrg.cdptvid) ? null : erpOrg.cdptvid) : null);//部门vid erpRequestData.Add("corpoid", erpOrg?.corpoid ?? null);//公司id erpRequestData.Add("corpvid", erpOrg?.corpvid ?? null);//公司vid erpRequestData.Add("creationtime", nowStr);//创建时间 @@ -351,7 +351,7 @@ namespace Tnb.WarehouseMgr { throw Oops.Bah("没有请求数据"); } - + BasFactoryConfig config = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.BIPURL); ThirdWebapiRecord thirdWebapiRecord = new ThirdWebapiRecord(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs index 9e74e0fa..62fe3170 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs @@ -290,6 +290,7 @@ namespace Tnb.WarehouseMgr erpRequestData.Add("creator",erpCreateId); erpRequestData.Add("dbilldate",purchase.create_time.ToString("yyyy-MM-dd HH:mm:ss")); erpRequestData.Add("dmakedate",nowStr); + erpRequestData.Add("ctrantypeid", erpOrg.transaction_type_id);//到货交易类型主键 erpRequestData.Add("ntotalastnum",purchaseDs.Sum(x=>x.purchase_arriveqty)); erpRequestData.Add("pk_arriveorder",null); // erpRequestData.Add("pk_dept","1001A1100000001JFOPQ"); From 8d4f3ef3b1f0689651548db2f7b0016cfc4fe1fc Mon Sep 17 00:00:00 2001 From: chenwenkai <1084072318@qq.com> Date: Fri, 25 Oct 2024 17:27:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?bip=E9=87=87=E8=B4=AD=E5=88=B0=E8=B4=A7?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=88=B0=E8=B4=A7=E4=BA=A4=E6=98=93=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 9 +++++++++ WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs | 2 +- apihost/Tnb.API.Entry/Configurations/Cache.json | 6 +++--- .../Tnb.API.Entry/Configurations/ConnectionStrings.json | 8 ++++---- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 81a5d52a..b4f40568 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -2025,6 +2025,15 @@ namespace Tnb.ProductionMgr PrdMo mo = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.mo_id); + #region 注塑生产任务提报时,如果起始库位( 当前设备的下料点)已经存在业务类型为配送申请,并且实际开始配送时间为空的任务执行,则不能提报,并提示 + if (mo.mo_type == DictConst.PrdMoTypeZS) + { + var wmsDistaskHs = _db.Queryable().Where(r => r.startlocation_id == equip.downmat_location_id && r.biz_type == WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID && !r.act_start_date.HasValue); + if (wmsDistaskHs != null && wmsDistaskHs.Count() > 0) + throw Oops.Bah("请等待AGV配送完成后提报"); + } + #endregion + bool changeBatchFlag = false; int changeCountNumByDay = 0; int changeCountNumByQty = 0; diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs index 62fe3170..d00201f7 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs @@ -290,7 +290,7 @@ namespace Tnb.WarehouseMgr erpRequestData.Add("creator",erpCreateId); erpRequestData.Add("dbilldate",purchase.create_time.ToString("yyyy-MM-dd HH:mm:ss")); erpRequestData.Add("dmakedate",nowStr); - erpRequestData.Add("ctrantypeid", erpOrg.transaction_type_id);//到货交易类型主键 + erpRequestData.Add("ctrantypeid", "0001H11000000000D2ZU");//到货交易类型主键 erpRequestData.Add("ntotalastnum",purchaseDs.Sum(x=>x.purchase_arriveqty)); erpRequestData.Add("pk_arriveorder",null); // erpRequestData.Add("pk_dept","1001A1100000001JFOPQ"); diff --git a/apihost/Tnb.API.Entry/Configurations/Cache.json b/apihost/Tnb.API.Entry/Configurations/Cache.json index 7a6d1350..52e8c235 100644 --- a/apihost/Tnb.API.Entry/Configurations/Cache.json +++ b/apihost/Tnb.API.Entry/Configurations/Cache.json @@ -2,19 +2,19 @@ "Cache": { "CacheType": "RedisCache", //MemoryCache "ip": "127.0.0.1", - "port": 6379, + "port": 6378, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" }, "Redis": { "ip": "127.0.0.1", - "port": 6379, + "port": 6378, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" }, "Redis2": { "ip": "127.0.0.1", - "port": 6379, + "port": 6378, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=1" } diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index 01aa1fd4..d7168ac0 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", + "DBName": "tianyi_cwk", + "UserName": "totong", + "Password": "IPANyxGSKxIXg0dBM", //SqlServer //"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true" //Kdbndp From 077aabeba5ae848d6080449a06bab3ef90719723 Mon Sep 17 00:00:00 2001 From: chenwenkai <1084072318@qq.com> Date: Fri, 25 Oct 2024 17:30:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Revert=20"bip=E9=87=87=E8=B4=AD=E5=88=B0?= =?UTF-8?q?=E8=B4=A7=E6=9B=B4=E6=94=B9=E5=88=B0=E8=B4=A7=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8d4f3ef3b1f0689651548db2f7b0016cfc4fe1fc. --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 9 --------- WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs | 2 +- apihost/Tnb.API.Entry/Configurations/Cache.json | 6 +++--- .../Tnb.API.Entry/Configurations/ConnectionStrings.json | 8 ++++---- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index b4f40568..81a5d52a 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -2025,15 +2025,6 @@ namespace Tnb.ProductionMgr PrdMo mo = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.mo_id); - #region 注塑生产任务提报时,如果起始库位( 当前设备的下料点)已经存在业务类型为配送申请,并且实际开始配送时间为空的任务执行,则不能提报,并提示 - if (mo.mo_type == DictConst.PrdMoTypeZS) - { - var wmsDistaskHs = _db.Queryable().Where(r => r.startlocation_id == equip.downmat_location_id && r.biz_type == WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID && !r.act_start_date.HasValue); - if (wmsDistaskHs != null && wmsDistaskHs.Count() > 0) - throw Oops.Bah("请等待AGV配送完成后提报"); - } - #endregion - bool changeBatchFlag = false; int changeCountNumByDay = 0; int changeCountNumByQty = 0; diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs index d00201f7..62fe3170 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs @@ -290,7 +290,7 @@ namespace Tnb.WarehouseMgr erpRequestData.Add("creator",erpCreateId); erpRequestData.Add("dbilldate",purchase.create_time.ToString("yyyy-MM-dd HH:mm:ss")); erpRequestData.Add("dmakedate",nowStr); - erpRequestData.Add("ctrantypeid", "0001H11000000000D2ZU");//到货交易类型主键 + erpRequestData.Add("ctrantypeid", erpOrg.transaction_type_id);//到货交易类型主键 erpRequestData.Add("ntotalastnum",purchaseDs.Sum(x=>x.purchase_arriveqty)); erpRequestData.Add("pk_arriveorder",null); // erpRequestData.Add("pk_dept","1001A1100000001JFOPQ"); diff --git a/apihost/Tnb.API.Entry/Configurations/Cache.json b/apihost/Tnb.API.Entry/Configurations/Cache.json index 52e8c235..7a6d1350 100644 --- a/apihost/Tnb.API.Entry/Configurations/Cache.json +++ b/apihost/Tnb.API.Entry/Configurations/Cache.json @@ -2,19 +2,19 @@ "Cache": { "CacheType": "RedisCache", //MemoryCache "ip": "127.0.0.1", - "port": 6378, + "port": 6379, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" }, "Redis": { "ip": "127.0.0.1", - "port": 6378, + "port": 6379, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" }, "Redis2": { "ip": "127.0.0.1", - "port": 6378, + "port": 6379, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=1" } diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index d7168ac0..01aa1fd4 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": "5431", + "Port": "5432", //"DBName": "tianyi_db", //"UserName": "postgres", //"Password": "pass@word123", - "DBName": "tianyi_cwk", - "UserName": "totong", - "Password": "IPANyxGSKxIXg0dBM", + "DBName": "tianyi", + "UserName": "postgres", + "Password": "pass@word123", //SqlServer //"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true" //Kdbndp From 7335b7aa2708082564ffdb0746f74721ba8d176e Mon Sep 17 00:00:00 2001 From: chenwenkai <1084072318@qq.com> Date: Fri, 25 Oct 2024 17:34:28 +0800 Subject: [PATCH 4/4] =?UTF-8?q?bip=E9=87=87=E8=B4=AD=E5=88=B0=E8=B4=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs index 62fe3170..d00201f7 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseService.cs @@ -290,7 +290,7 @@ namespace Tnb.WarehouseMgr erpRequestData.Add("creator",erpCreateId); erpRequestData.Add("dbilldate",purchase.create_time.ToString("yyyy-MM-dd HH:mm:ss")); erpRequestData.Add("dmakedate",nowStr); - erpRequestData.Add("ctrantypeid", erpOrg.transaction_type_id);//到货交易类型主键 + erpRequestData.Add("ctrantypeid", "0001H11000000000D2ZU");//到货交易类型主键 erpRequestData.Add("ntotalastnum",purchaseDs.Sum(x=>x.purchase_arriveqty)); erpRequestData.Add("pk_arriveorder",null); // erpRequestData.Add("pk_dept","1001A1100000001JFOPQ");