|
|
@@ -4424,9 +4424,14 @@ namespace Business.Replenishment
|
|
|
long factoryid=Convert.ToInt64(factory_id);
|
|
|
long companyid=Convert.ToInt64(company_id);
|
|
|
var weekPlan=_replenishmentWeekPlan.FindAsync(a => a.Id == id && a.tenant_id == tenantid && a.factory_id == factoryid && a.company_id == companyid).Result;
|
|
|
- var isExistSamePriority = _replenishmentWeekPlan.GetListAsync(a => a.Id != id && a.Week == weekPlan.Week && a.Priority == newpriority).Result;
|
|
|
- if(isExistSamePriority.Any())
|
|
|
- return "优先级重复,请重新调整。";
|
|
|
+ //周计划没有生成周工单的不校验优先级重复
|
|
|
+ if(weekPlan!=null && !string.IsNullOrEmpty(weekPlan.ProductionOrder))
|
|
|
+ {
|
|
|
+ var isExistSamePriority = _workOrdMaster.Select(a => a.WorkOrd !=weekPlan.ProductionOrder && (string.IsNullOrEmpty(a.Status) || a.Status.ToUpper()=="P") && a.Priority == newpriority);
|
|
|
+ if (isExistSamePriority.Any())
|
|
|
+ return "优先级重复,请重新调整。";
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
weekPlan.Priority= newpriority;
|
|
|
weekPlan.Qty= newqty;
|