测试 SortSchedule

This commit is contained in:
xiaowei.song
2023-11-16 16:13:30 +08:00
parent cac6397feb
commit 77980f8c24
4 changed files with 121 additions and 2 deletions

View File

@@ -12,5 +12,9 @@ namespace ZR.Service.mes.pro.IService
public interface IProWorkorderService
{
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week,int date,string isSchedule);
public int SetWorkorderSechedule(string id, DateTime arrange_starttime, DateTime arrange_endtime);
public int ResetWorkorderSechedule(string id);
}
}

View File

@@ -32,5 +32,22 @@ namespace ZR.Service.mes.pro
return (proWorkorderList, totalCount);
}
public int SetWorkorderSechedule(string id, DateTime arrange_starttime, DateTime arrange_endtime)
{
return Context.Updateable<ProWorkorder>()
.SetColumns(it => new ProWorkorder() { ArrangeStarttime = arrange_starttime, ArrangeEndtime = arrange_endtime, Isarrange = "1" })
.Where(it => it.Id.Equals(id))
.ExecuteCommand();
}
public int ResetWorkorderSechedule(string id)
{
return Context.Updateable<ProWorkorder>()
.SetColumns(it => it.Isarrange == "0")
.Where(it => it.Id.Equals(id))
.ExecuteCommand();
}
}
}