修正排程
This commit is contained in:
parent
aed14d380f
commit
08ba5f0652
@ -92,6 +92,21 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下达生产指令
|
||||
/// </summary>
|
||||
/// <param name="id">工单ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("releaseProduction/{id}")]
|
||||
public IActionResult ReleaseProduction(string id)
|
||||
{
|
||||
|
||||
int data = proWorkorderService.ReleaseProduction(id);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 对当前的,排产工单排序
|
||||
/// </summary>
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user