工单对象中 去掉了两个字段 增加了工单状态
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ namespace ZR.Service.mes.qu.IService
|
||||
{
|
||||
public interface IQuRoughService
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ namespace ZR.Service.mes.qu
|
||||
public class QuRoughService : BaseService<QuRough>, IQuRoughService
|
||||
{
|
||||
|
||||
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)
|
||||
.AndIF(date > 0, it => it.Isarrange.Equals(isSchedule))
|
||||
.AndIF(date > 0, it => it.Wrokerorder_status==isSchedule)
|
||||
.ToExpression();
|
||||
|
||||
int totalCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user