|
@@ -357,19 +357,11 @@ namespace Business.ResourceExamineManagement
|
|
|
mesorder.ooentry_stime = plan_date.GetValueOrDefault().AddDays(-srmprDto.totalLeadTime.GetValueOrDefault());
|
|
mesorder.ooentry_stime = plan_date.GetValueOrDefault().AddDays(-srmprDto.totalLeadTime.GetValueOrDefault());
|
|
|
|
|
|
|
|
//先计算末级数据的齐套时间。
|
|
//先计算末级数据的齐套时间。
|
|
|
- if (childList.Count > 0 && LongPeriod)//按业务要求,委外件不向下展开子料
|
|
|
|
|
|
|
+ if (childList.Count > 0)//按业务要求,委外件向下展开子料
|
|
|
{
|
|
{
|
|
|
MatterTileDevelop(level1Dto, childList, returnlist, sklist, bangid, mesorder.ooentry_stime, sentrys, icitemlist);
|
|
MatterTileDevelop(level1Dto, childList, returnlist, sklist, bangid, mesorder.ooentry_stime, sentrys, icitemlist);
|
|
|
-
|
|
|
|
|
- var itemTime = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(srmprDto.totalLeadTime.GetValueOrDefault());//加上物料的采购提前期
|
|
|
|
|
- if (LongPeriod)
|
|
|
|
|
- {
|
|
|
|
|
- level1Dto.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
- else if (itemTime > level1Dto.kitting_time)
|
|
|
|
|
- {
|
|
|
|
|
- level1Dto.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ level1Dto.kitting_time = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(srmprDto.totalLeadTime.GetValueOrDefault());//加上物料的采购提前期
|
|
|
if (IsStraight)
|
|
if (IsStraight)
|
|
|
{
|
|
{
|
|
|
mesorder.ooentry_stime = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(1);
|
|
mesorder.ooentry_stime = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(1);
|
|
@@ -915,18 +907,10 @@ namespace Business.ResourceExamineManagement
|
|
|
if (item.erp_cls == 2 && wwCount > 0)
|
|
if (item.erp_cls == 2 && wwCount > 0)
|
|
|
{
|
|
{
|
|
|
//先计算末级数据的齐套时间。
|
|
//先计算末级数据的齐套时间。
|
|
|
- if (cilList.Count > 0 && LongPeriod)//按业务要求,委外件不向下展开子料
|
|
|
|
|
|
|
+ if (cilList.Count > 0)//按业务要求,委外件打开向下展开子料
|
|
|
{
|
|
{
|
|
|
CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
|
|
CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
|
|
|
- var itemTime = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
|
|
|
|
|
- if (LongPeriod)
|
|
|
|
|
- {
|
|
|
|
|
- item.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
- else if (itemTime > item.kitting_time)
|
|
|
|
|
- {
|
|
|
|
|
- item.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ item.kitting_time = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
|
|
|
}
|
|
}
|
|
|
item.subcontracting_qty = wwCount;
|
|
item.subcontracting_qty = wwCount;
|
|
|
item.subcontracting_list = new List<ooder>();
|
|
item.subcontracting_list = new List<ooder>();
|
|
@@ -1532,18 +1516,10 @@ namespace Business.ResourceExamineManagement
|
|
|
if (sct.erp_cls == 2 && wwCount > 0)
|
|
if (sct.erp_cls == 2 && wwCount > 0)
|
|
|
{
|
|
{
|
|
|
//先计算末级数据的齐套时间。
|
|
//先计算末级数据的齐套时间。
|
|
|
- if (cilList.Count > 0 && LongPeriod)//按业务要求,委外件不向下展开子料
|
|
|
|
|
|
|
+ if (cilList.Count > 0)//按业务要求,委外件向下展开子料
|
|
|
{
|
|
{
|
|
|
CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
|
|
CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
|
|
|
- var itemTime = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
|
|
|
|
|
- if (LongPeriod)
|
|
|
|
|
- {
|
|
|
|
|
- sct.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
- else if (itemTime > sct.kitting_time)
|
|
|
|
|
- {
|
|
|
|
|
- sct.kitting_time = itemTime;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ sct.kitting_time = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
|
|
|
}
|
|
}
|
|
|
sct.subcontracting_qty = wwCount;
|
|
sct.subcontracting_qty = wwCount;
|
|
|
sct.subcontracting_list = new List<ooder>();
|
|
sct.subcontracting_list = new List<ooder>();
|