|
|
@@ -183,7 +183,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="DeliverDate">交付日期</param>
|
|
|
/// <param name="seorderentry_id">销售订单子表ID</param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<List<mes_mooccupy>> CheckMorder(string bomNumber, decimal? Quantity, DateTime DeliverDate, crm_seorderentry seorderentry, ic_item ic_Item)
|
|
|
+ public async Task<List<mes_mooccupy>> CheckMorder(string bomNumber, decimal? Quantity, DateTime DeliverDate, crm_seorderentry seorderentry, ic_item ic_Item,bool flag = true)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(bomNumber) || Quantity == null)
|
|
|
{
|
|
|
@@ -282,7 +282,10 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- await _mes_mooccupy.InsertMany(mes_Mooccupies);
|
|
|
+ if (flag)
|
|
|
+ {
|
|
|
+ await _mes_mooccupy.InsertMany(mes_Mooccupies);
|
|
|
+ }
|
|
|
#region 注释
|
|
|
// if (morderDataList.Count > 0)
|
|
|
// {
|
|
|
@@ -369,7 +372,7 @@ namespace Business.ResourceExamineManagement
|
|
|
// }
|
|
|
#endregion
|
|
|
//TODO:返回占用数据,外层每个BOM根据占用工单数据判断是否满足。
|
|
|
- return mes_Mooccupies;
|
|
|
+ return mes_Mooccupies.OrderByDescending(s=>s.moo_etime).ToList();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 拼接工单占用表
|