|
|
@@ -7,6 +7,7 @@ using Bussiness.Model.SRM;
|
|
|
using Bussiness.MongoModel.MES.IC;
|
|
|
using Bussiness.MongoModel.Production;
|
|
|
using Bussiness.MongoModel.Sale;
|
|
|
+using Bussiness.MongoModel.SRM;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
@@ -91,7 +92,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="input"></param>
|
|
|
/// <param name="plan_date"></param>
|
|
|
public void CalcView(List<BomChildExamineDto> returnlist, long bangid, decimal count, SeorderentryDto input, DateTime
|
|
|
- ? plan_date, List<mo_ic_item_stockoccupy> sklist, mo_crm_seorderentry sentrys, List<mo_ic_item> icitemlist)
|
|
|
+ ? plan_date, List<mo_ic_item_stockoccupy> sklist, crm_seorderentry sentrys, List<mo_ic_item> icitemlist)
|
|
|
{
|
|
|
//第一级
|
|
|
returnlist = returnlist.OrderBy(s => s.num_order).ToList();
|
|
|
@@ -296,7 +297,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="sklist"></param>
|
|
|
/// <param name="plan_date"></param>
|
|
|
public void CalcIcitem(List<BomChildExamineDto> childList, List<BomChildExamineDto> returnlist, long bangid, SeorderentryDto input, List<mo_ic_item_stockoccupy> sklist, DateTime
|
|
|
- ? plan_date, List<mo_ic_item> icitemlist, mo_crm_seorderentry sentrys)
|
|
|
+ ? plan_date, List<mo_ic_item> icitemlist, crm_seorderentry sentrys)
|
|
|
{
|
|
|
foreach (var item in childList)
|
|
|
{
|
|
|
@@ -339,7 +340,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="bangid"></param>
|
|
|
/// <param name="input"></param>
|
|
|
public void StartProcessing(BomChildExamineDto item, List<mo_ic_item> icitemlist, List<BomChildExamineDto> returnlist, DateTime
|
|
|
- ? plan_date, mo_crm_seorderentry sentrys, List<mo_ic_item_stockoccupy> sklist, mo_ic_item_stockoccupy itemStockoccupyDto, long bangid, SeorderentryDto input)
|
|
|
+ ? plan_date, crm_seorderentry sentrys, List<mo_ic_item_stockoccupy> sklist, mo_ic_item_stockoccupy itemStockoccupyDto, long bangid, SeorderentryDto input)
|
|
|
{
|
|
|
var parent = returnlist.Find(s => s.id == item.parent_id);
|
|
|
if (item.lack_qty > 0)
|
|
|
@@ -439,7 +440,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="input"></param>
|
|
|
/// <param name="plan_date"></param>
|
|
|
public void CalcStrategy(BomChildExamineDto item, List<BomChildExamineDto> returnlist, long bangid, List<mo_ic_item_stockoccupy> sklist, SeorderentryDto input, DateTime
|
|
|
- ? plan_date, List<mo_ic_item> icitemlist, mo_crm_seorderentry sentrys)
|
|
|
+ ? plan_date, List<mo_ic_item> icitemlist, crm_seorderentry sentrys)
|
|
|
{
|
|
|
//提取群组关系
|
|
|
var sublist = returnlist.Where(s => s.parent_id == item.parent_id && s.num == item.num && s.level == item.level).OrderBy(c => c.substitute_all_num).ToList();
|
|
|
@@ -518,7 +519,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="input"></param>
|
|
|
/// <param name="plan_date"></param>
|
|
|
public void WholeBatch(BomChildExamineDto item, List<BomChildExamineDto> sublist, List<BomChildExamineDto> returnlist, List<mo_ic_item_stockoccupy> sklist, List<BomChildExamineDto> select, long bangid, BomChildExamineDto parent, SeorderentryDto input, DateTime
|
|
|
- ? plan_date, List<mo_ic_item> icitemlist, mo_crm_seorderentry sentrys)
|
|
|
+ ? plan_date, List<mo_ic_item> icitemlist, crm_seorderentry sentrys)
|
|
|
{
|
|
|
if (select.Count() == 0)
|
|
|
{
|
|
|
@@ -560,7 +561,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="input"></param>
|
|
|
/// <param name="plan_date"></param>
|
|
|
public void MixedUse(BomChildExamineDto item, List<BomChildExamineDto> sublist, List<BomChildExamineDto> returnlist, List<mo_ic_item_stockoccupy> sklist, long bangid, BomChildExamineDto parent, SeorderentryDto input, DateTime
|
|
|
- ? plan_date, List<mo_ic_item> icitemlist, mo_crm_seorderentry sentrys)
|
|
|
+ ? plan_date, List<mo_ic_item> icitemlist, crm_seorderentry sentrys)
|
|
|
{
|
|
|
|
|
|
decimal parent_lack = 0;
|
|
|
@@ -752,7 +753,7 @@ namespace Business.ResourceExamineManagement
|
|
|
private SRMPRDto CreateSRMPR(BomChildExamineDto returnlist, long tenantId, long factoryid, long bangId, int orderType, List<ICItemLeadTimeDto> iCItemLeadTimes, List<ic_item_pur> supplierList, List<ic_plan> planList, DateTime deliveryDate)
|
|
|
{
|
|
|
SRMPRDto sRMPR = new SRMPRDto();
|
|
|
- srm_pr_main srm_Pr = new srm_pr_main();
|
|
|
+ mo_srm_pr_main srm_Pr = new mo_srm_pr_main();
|
|
|
var leadTime = iCItemLeadTimes.Find(x => x.item_id == returnlist.item_id);
|
|
|
var supplier = supplierList.Find(x => x.icitem_id == returnlist.item_id);//默认取第一个供应商
|
|
|
var plan = planList.Find(x => x.icitem_id == returnlist.item_id);
|