|
|
@@ -80,7 +80,7 @@ namespace Business.ResourceExamineManagement
|
|
|
throw new NotImplementedException("工序数据不存在,请调整!");
|
|
|
}
|
|
|
//1.4、获取工位数据
|
|
|
- List<mo_mes_tech_proc_workshop> curWorkShops = tech_Proc_Workshops.Where(p=> curTechProcess.Select(m=>m.mysql_id).Contains(p.tech_proc_id.GetValueOrDefault())).ToList(); ;
|
|
|
+ List<mo_mes_tech_proc_workshop> curWorkShops = tech_Proc_Workshops.Where(p=> curTechProcess.Select(m=>m.mysql_id).Contains(p.tech_proc_id)).ToList(); ;
|
|
|
|
|
|
//2、获取工艺路径下的第一层级工序:目前只考虑第一层级
|
|
|
List<mo_mes_tech_process> fistLevels = curTechProcess.Where(p => p.parentprocid == curTech.mysql_id).ToList();
|
|
|
@@ -109,7 +109,7 @@ namespace Business.ResourceExamineManagement
|
|
|
//获取下一步工序id
|
|
|
List<long> nextProcIds = processes.Where(p=>p.nextprocid != null).Select(p => p.nextprocid.GetValueOrDefault()).ToList();
|
|
|
//获取起点工序
|
|
|
- var startProcs = processes.Where(p => !nextProcIds.Contains(p.proc_id.GetValueOrDefault())).ToList();
|
|
|
+ var startProcs = processes.Where(p => !nextProcIds.Contains(p.proc_id)).ToList();
|
|
|
//递归处理工序返回值
|
|
|
List<mo_mes_tech_process> rtnList;
|
|
|
for (int i = 0; i < startProcs.Count; i++)
|
|
|
@@ -191,8 +191,8 @@ namespace Business.ResourceExamineManagement
|
|
|
//记录当前工序耗时
|
|
|
StartTimeDto dto = new StartTimeDto();
|
|
|
//添加耗时记录
|
|
|
- dto.tech_id = proc.tech_id.GetValueOrDefault();
|
|
|
- dto.proc_id = proc.proc_id.GetValueOrDefault();
|
|
|
+ dto.tech_id = proc.tech_id;
|
|
|
+ dto.proc_id = proc.proc_id;
|
|
|
dto.nextproc_id = proc.nextprocid;
|
|
|
if (proc.wctype == 1)//人工型:数量/uph(一小时生产数量)*60(小时转换为分钟)/wsinuse(工位数)
|
|
|
{
|
|
|
@@ -239,8 +239,8 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
dto = new StartTimeDto();
|
|
|
//添加耗时记录
|
|
|
- dto.tech_id = chd.tech_id.GetValueOrDefault();
|
|
|
- dto.proc_id = chd.proc_id.GetValueOrDefault();
|
|
|
+ dto.tech_id = chd.tech_id;
|
|
|
+ dto.proc_id = chd.proc_id;
|
|
|
dto.nextproc_id = chd.nextprocid;
|
|
|
|
|
|
//计算当前工序生产耗时
|