|
|
@@ -292,6 +292,7 @@ namespace Business.ResourceExamineManagement
|
|
|
|
|
|
private readonly ISqlRepository<rf_serialnumber> _rf_serialnumber;
|
|
|
private readonly ISqlRepository<LocationDetail> _locationDetail;
|
|
|
+ private readonly ISqlRepository<ConfigurationItem> _configurationItem;
|
|
|
/// <summary>
|
|
|
/// 资源检查入参
|
|
|
/// </summary>
|
|
|
@@ -480,6 +481,7 @@ namespace Business.ResourceExamineManagement
|
|
|
ProductExamineAppService productExamineAppService,
|
|
|
ISqlRepository<rf_serialnumber> rf_serialnumber,
|
|
|
ISqlRepository<LocationDetail> locationDetail,
|
|
|
+ ISqlRepository<ConfigurationItem> configurationItem,
|
|
|
ISqlRepository<ItemPackMaster> itemPackMaster,
|
|
|
ISqlRepository<GeneralizedCodeMaster> generalizedCodeMaster,
|
|
|
ISqlRepository<ScheduleResultOpMaster> scheduleResultOpMaster,
|
|
|
@@ -583,6 +585,7 @@ namespace Business.ResourceExamineManagement
|
|
|
_holidayMaster = holidayMaster;
|
|
|
_productExamineAppService = productExamineAppService;
|
|
|
_locationDetail = locationDetail;
|
|
|
+ _configurationItem = configurationItem;
|
|
|
_itemPackMaster = itemPackMaster;
|
|
|
_generalizedCodeMaster = generalizedCodeMaster;
|
|
|
_unitOfWorkManager = unitOfWorkManager;
|
|
|
@@ -1959,7 +1962,13 @@ namespace Business.ResourceExamineManagement
|
|
|
if (icitemStokc.Count > 0)
|
|
|
{
|
|
|
List<string> numbers = pretreatments.Select(s => s.item_number).ToList();
|
|
|
- List<string> locationList = new List<string> { "1000", "1001", "5008","8000","8001" };
|
|
|
+ var locationRange = _configurationItem.Select(x => x.FldName == "MRPLocationRange" && x.Domain == companyId.ToString()).FirstOrDefault();
|
|
|
+
|
|
|
+ List<string> locationList = new List<string> { "1000", "1001", "5008", "8000", "8001" };
|
|
|
+ if (locationRange != null && locationRange.Val != null)
|
|
|
+ {
|
|
|
+ locationList = locationRange.Val.SplitToArray(",").ToList();
|
|
|
+ }
|
|
|
var locStock = _invMaster.Select(a => numbers.Contains(a.ItemNum) && a.IsActive && a.Domain == factoryId.ToString() && locationList.Contains(a.Location));
|
|
|
//设置当前计算bangid
|
|
|
icitemStokc.ForEach(item => {
|
|
|
@@ -2056,6 +2065,7 @@ namespace Business.ResourceExamineManagement
|
|
|
var moSrm_po_main = ObjectMapper.Map<List<srm_po_main>, List<mo_srm_po_main>>(srm_po_main);
|
|
|
moSrm_po_main.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await MongoHelper<mo_srm_po_main>.InsertManyAsync(moSrm_po_main);
|
|
|
+
|
|
|
//订单明细--根据在途PO过滤出有效的Po_list
|
|
|
srm_po_list = srm_po_list.Where(s => srm_po_main.Select(x => x.Id).Contains(s.po_id.GetValueOrDefault())).ToList();
|
|
|
var moSrm_po_list = ObjectMapper.Map<List<srm_po_list>, List<mo_srm_po_list>>(srm_po_list);
|