diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 97a36109..cf03f7a9 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -478,7 +478,7 @@ namespace Tnb.ProductionMgr // } /// - /// 定点配送 + /// 空载具定点配送 /// /// [HttpGet] @@ -540,12 +540,13 @@ namespace Tnb.ProductionMgr Log.Error($"{equipment.name}未配置上料库位"); continue; } - if (await _db.Queryable().AnyAsync(x => + if (await _db.Queryable().AnyAsync(x => x.endlocation_id == equipment.upmat_location_id && x.biz_type == WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID && - (x.status == WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID - || x.status == WmsWareHouseConst.PRETASK_BILL_STATUS_YXF_ID - || x.status == WmsWareHouseConst.PRETASK_BILL_STATUS_START_ID + (x.status == WmsWareHouseConst.TASK_BILL_STATUS_DZX_ID + || x.status == WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID + || x.status == WmsWareHouseConst.TASK_BILL_STATUS_RUNING_ID + || x.status == WmsWareHouseConst.TASK_BILL_STATUS_PAUSE_ID ) )) { diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs index 6767139d..a8ad461b 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs @@ -231,6 +231,10 @@ namespace Tnb.WarehouseMgr.Entities.Consts /// public const string TASK_BILL_STATUS_RUNING_ID = "26126856028453"; /// + /// 任务单据状态-已暂停Id + /// + public const string TASK_BILL_STATUS_PAUSE_ID = "26126866160677"; + /// /// 任务单据状态-已完成ID /// public const string TASK_BILL_STATUS_COMPLE_ID = "26126860808229"; diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsRawmatOutstockH.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsRawmatOutstockH.cs index adaf2acd..6759c201 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsRawmatOutstockH.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Entity/WmsRawmatOutstockH.cs @@ -103,5 +103,8 @@ public partial class WmsRawmatOutstockH : BaseEntity /// public string? erp_project_id { get; set; } - + /// + /// erp领料员 存的天益用户表的id 需关联erp_extend_field 取 + /// + public string? erp_cbizid { get; set; } } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsRawmatOutstockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsRawmatOutstockService.cs index b7f82f05..a4b2d6ef 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsRawmatOutstockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsRawmatOutstockService.cs @@ -123,6 +123,7 @@ namespace Tnb.WarehouseMgr string userId = wmsRawmatOutstockH.create_id ?? WmsWareHouseConst.AdministratorUserId; tableIds.Add(userId); + tableIds.Add(wmsRawmatOutstockH.erp_cbizid); List erpExtendFields = await _db.Queryable().Where(x => tableIds.Contains(x.table_id)).ToListAsync(); // string erpCreateId = erpExtendFields.Find(x => x.table_id == userId)?.user_id ?? WmsWareHouseConst.ERPUSERID; string erpCreateId = WmsWareHouseConst.ERPUSERID; @@ -133,6 +134,8 @@ namespace Tnb.WarehouseMgr List> requestData = new List>(); Dictionary erpRequestData = new Dictionary(); erpRequestData.Add("billmaker", erpCreateId); + erpRequestData.Add("cbizid", wmsRawmatOutstockH.erp_cbizid!=null ? erpExtendFields.Find(x => x.table_id == wmsRawmatOutstockH.erp_cbizid)?.person_id : null); + erpRequestData.Add("cwhsmanagerid", erpExtendFields.Find(x => x.table_id == userId)?.person_id); erpRequestData.Add("ccostdomainoid", wmsRawmatOutstockH.erp_org_costregion ?? "1001A1100000001MNB3H"); erpRequestData.Add("cdrawcalbodyoid", erpOrg.pk_org); erpRequestData.Add("cdrawcalbodyvid", erpOrg.pk_org_v);