获取工单下的报工列表
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using DOAN.Model.MES.base_;
|
||||
using DOAN.Model.MES.product;
|
||||
using DOAN.Model.Mobile.ReportFlow.Dto;
|
||||
using DOAN.Model.Public;
|
||||
using DOAN.Service.Mobile.IService;
|
||||
using DOAN.Service.Public.IPublicService;
|
||||
@@ -18,18 +20,18 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
return Context.Queryable<ProWorkorder>().Where(x => x.Workorder == workorder).First();
|
||||
}
|
||||
|
||||
public ProReportwork01 GetProcessReportWorkDetail(string workorder, string process)
|
||||
public ProReportwork01 GetProcessReportWorkDetail(string workorder, int process)
|
||||
{
|
||||
return Context.Queryable<ProReportwork01>().Where(x => x.Workorder == workorder && x.ProcessCode == process).First();
|
||||
return Context.Queryable<ProReportwork01>().Where(x => x.Workorder == workorder && x.ProcessId == process).First();
|
||||
}
|
||||
|
||||
public bool ProcessReportWork(string workorder, string process, int finish_num,int bad_num,string Worker)
|
||||
public bool ProcessReportWork(string workorder, int process, int finish_num,int bad_num,string Worker)
|
||||
{
|
||||
int result = 0;
|
||||
bool Exist= Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder&&it.ProcessCode==process).Any();
|
||||
bool Exist= Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder&&it.ProcessId==process).Any();
|
||||
if (Exist)
|
||||
{
|
||||
result= Context.Updateable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessCode == process)
|
||||
result= Context.Updateable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == process)
|
||||
.SetColumns(it => it.FinishNum == finish_num)
|
||||
.SetColumns(it => it.BadNum == bad_num)
|
||||
.SetColumns(it => it.Worker == Worker)
|
||||
@@ -44,7 +46,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
ProReportwork01 proReportwork01=new ProReportwork01();
|
||||
proReportwork01.Id = XueHua;
|
||||
proReportwork01.Workorder = workorder;
|
||||
proReportwork01.ProcessCode = process;
|
||||
proReportwork01.ProcessId = process;
|
||||
proReportwork01.FinishNum = finish_num;
|
||||
proReportwork01.BadNum = bad_num;
|
||||
proReportwork01.Worker = Worker;
|
||||
@@ -58,9 +60,24 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
}
|
||||
|
||||
|
||||
public List<ProReportwork01> GetWorkOrderReportWorkList(string workorder)
|
||||
public List<ProReportWorkDetialDto> GetWorkOrderReportWorkList(string workorder)
|
||||
{
|
||||
return Context.Queryable<ProReportwork01>().Where(x => x.Workorder == workorder).ToList();
|
||||
|
||||
|
||||
|
||||
return Context.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.Where((rw, wp) => rw.Workorder == workorder)
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
}, true)
|
||||
.ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user