修正排程
This commit is contained in:
@@ -18,5 +18,8 @@ namespace ZR.Service.mes.pro.IService
|
||||
public int ResetWorkorderSechedule(string id);
|
||||
|
||||
public int SortWorkorderSchedule(string id, int sort);
|
||||
|
||||
public int ReleaseProduction(string id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace ZR.Service.mes.pro
|
||||
|
||||
TimeSpan productionTime = arrange_endtime - arrange_starttime;
|
||||
return Context.Updateable<ProWorkorder>()
|
||||
.SetColumns(it => new ProWorkorder() { ArrangeStarttime = arrange_starttime, ArrangeEndtime = arrange_endtime, Isarrange = "1", ProductionTime = (decimal)productionTime.TotalMinutes,Order=(int) CacheHelper.GetCache("workorder_id_max") })
|
||||
.SetColumns(it => new ProWorkorder() { ArrangeStarttime = arrange_starttime, ArrangeEndtime = arrange_endtime, Isarrange = "1", ProductionTime = (decimal)productionTime.TotalMinutes,Order=(int) CacheHelper.GetCache("workorder_id_max"),Isproduction="0" })
|
||||
.Where(it => it.Id.Equals(id))
|
||||
.ExecuteCommand();
|
||||
}
|
||||
@@ -74,5 +74,13 @@ namespace ZR.Service.mes.pro
|
||||
.Where(it => it.Id.Equals(id))
|
||||
.ExecuteCommand();
|
||||
}
|
||||
|
||||
public int ReleaseProduction(string id)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>()
|
||||
.SetColumns(it => it.Isproduction == "1")
|
||||
.Where(it => it.Id.Equals(id))
|
||||
.ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user