工单对象中 去掉了两个字段 增加了工单状态

This commit is contained in:
xiaowei.song
2023-11-24 08:45:24 +08:00
parent 08ba5f0652
commit add375531b
8 changed files with 18 additions and 26 deletions

View File

@@ -11,7 +11,7 @@ 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 (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week,int date, int isSchedule);
public int SetWorkorderSechedule(string id, DateTime arrange_starttime, DateTime arrange_endtime);

View File

@@ -19,14 +19,14 @@ namespace ZR.Service.mes.pro
public class ProWorkorderService : BaseService<ProWorkorder>, IProWorkorderService
{
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, string isSchedule)
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, int isSchedule)
{
var predicate = Expressionable.Create<ProWorkorder>()
.AndIF(year > 0, it => it.Year == year)
.AndIF(week > 0, it => it.Week == week)
.AndIF(date > 0, it => it.Date == date)
.And(it => it.Isarrange.Equals(isSchedule))
.And(it => it.Wrokerorder_status.Equals(isSchedule))
.ToExpression();
int totalCount = 0;
@@ -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"),Isproduction="0" })
.SetColumns(it => new ProWorkorder() { ArrangeStarttime = arrange_starttime, ArrangeEndtime = arrange_endtime, Wrokerorder_status = 1, ProductionTime = (decimal)productionTime.TotalMinutes,Order=(int) CacheHelper.GetCache("workorder_id_max") })
.Where(it => it.Id.Equals(id))
.ExecuteCommand();
}
@@ -61,7 +61,7 @@ namespace ZR.Service.mes.pro
public int ResetWorkorderSechedule(string id)
{
return Context.Updateable<ProWorkorder>()
.SetColumns(it => it.Isarrange == "0")
.SetColumns(it => it.Wrokerorder_status == 0)
.SetColumns(it => it.Order == 0)
.Where(it => it.Id.Equals(id))
.ExecuteCommand();
@@ -78,7 +78,7 @@ namespace ZR.Service.mes.pro
public int ReleaseProduction(string id)
{
return Context.Updateable<ProWorkorder>()
.SetColumns(it => it.Isproduction == "1")
.SetColumns(it => it.Wrokerorder_status == 1)
.Where(it => it.Id.Equals(id))
.ExecuteCommand();
}