|
|
@@ -2376,19 +2376,19 @@ namespace Business.ResourceExamineManagement
|
|
|
if (nbr.Ufld1 == "completed")
|
|
|
{
|
|
|
//工单状态为 “生产齐套”
|
|
|
- mo.MaterialSituation = "生产齐套";
|
|
|
+ mo.MaterialSituation = MorderEnum.ProduceComplete;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//工单状态为 “备料滞后”
|
|
|
- mo.MaterialSituation = "备料滞后";
|
|
|
+ mo.MaterialSituation = MorderEnum.Lag;
|
|
|
}
|
|
|
}
|
|
|
//完成时间未到
|
|
|
else if (nbr.EffDate.GetValueOrDefault().Date > DateTime.Now.Date)
|
|
|
{
|
|
|
//工单状态为 “备料中”
|
|
|
- mo.MaterialSituation = "备料中";
|
|
|
+ mo.MaterialSituation = MorderEnum.Preparation;
|
|
|
}
|
|
|
//完成时间已经过去,则不做处理
|
|
|
}
|
|
|
@@ -2445,17 +2445,17 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
//生成领料单
|
|
|
workords += "," + cmo.morder_no;
|
|
|
- cmo.MaterialSituation = "备料中";
|
|
|
+ cmo.MaterialSituation = MorderEnum.Preparation;
|
|
|
cmo.morder_state = MorderEnum.Xd_state;
|
|
|
}
|
|
|
else {
|
|
|
- cmo.MaterialSituation = "仓库齐套";
|
|
|
+ cmo.MaterialSituation = MorderEnum.CarehouseComplete;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//工单状态为 “仓库不齐套”
|
|
|
- cmo.MaterialSituation = "仓库不齐套";
|
|
|
+ cmo.MaterialSituation = MorderEnum.NoCarehouseComplete;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -3421,6 +3421,11 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
|
|
|
//增加判断当前工单是否进行过齐套检查,并且是仓库齐套
|
|
|
+ var mes_morders = _mysql_mes_morder.GetListAsync(s => dbWorkOrds.Contains(s.morder_no)).Result;
|
|
|
+ if (mes_morders.Where(s => s.MaterialSituation != MorderEnum.CarehouseComplete).Any())
|
|
|
+ {
|
|
|
+ return "请选择物料情况为“仓库齐套”的工单。";
|
|
|
+ }
|
|
|
|
|
|
List<NbrMaster> nbrMasterList = new List<NbrMaster>();//需要生成领料单列表
|
|
|
List<NbrDetail> nbrDetailList = new List<NbrDetail>();//需要生成领料单明细列表
|