出货工序
This commit is contained in:
@@ -147,19 +147,28 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
Worker = string.IsNullOrEmpty(NickName) ? Worker + "|异常人员|" : NickName;
|
||||
if (Exist)
|
||||
{
|
||||
result = Context.Updateable<ProReportwork01>()
|
||||
.Where(it => it.Workorder == workorder && it.ProcessId == processId)
|
||||
.SetColumns(it => it.FinishNum == finish_num)
|
||||
.SetColumns(it => it.RouteId == 32)
|
||||
.SetColumns(it => it.BadNum == bad_num)
|
||||
.SetColumns(it => it.Worker == Worker)
|
||||
.SetColumns(it => it.JobDateTime == DateTime.Now)
|
||||
.SetColumns(it => it.UpdatedBy == Worker)
|
||||
.SetColumns(it => it.UpdatedTime == DateTime.Now)
|
||||
.ExecuteCommand();
|
||||
Context.Updateable<ProWorkorder>().Where(it => it.Workorder == workorder)
|
||||
.SetColumns(it => it.CustomerOrder == customer_order)
|
||||
.ExecuteCommand();
|
||||
UseTran2(() =>
|
||||
{
|
||||
result = Context.Updateable<ProReportwork01>()
|
||||
.Where(it => it.Workorder == workorder && it.ProcessId == processId)
|
||||
.SetColumns(it => it.FinishNum == finish_num)
|
||||
.SetColumns(it => it.RouteId == 32)
|
||||
.SetColumns(it => it.BadNum == bad_num)
|
||||
.SetColumns(it => it.Worker == Worker)
|
||||
.SetColumns(it => it.JobDateTime == DateTime.Now)
|
||||
.SetColumns(it => it.UpdatedBy == Worker)
|
||||
.SetColumns(it => it.UpdatedTime == DateTime.Now)
|
||||
.ExecuteCommand();
|
||||
Context.Updateable<ProWorkorder>().Where(it => it.Workorder == workorder)
|
||||
.SetColumns(it => it.CustomerOrder == customer_order)
|
||||
.ExecuteCommand();
|
||||
//出货工序
|
||||
Context.Updateable<ProWorkorder>()
|
||||
.SetColumns(it => it.ShipmentNum == finish_num)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
@@ -175,10 +184,19 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
proReportwork01.JobDateTime = DateTime.Now;
|
||||
proReportwork01.CreatedBy = Worker;
|
||||
proReportwork01.CreatedTime = DateTime.Now;
|
||||
result = Context.Insertable(proReportwork01).ExecuteCommand();
|
||||
Context.Updateable<ProWorkorder>().Where(it => it.Workorder == workorder)
|
||||
.SetColumns(it => it.CustomerOrder == customer_order)
|
||||
.ExecuteCommand();
|
||||
UseTran2(() =>
|
||||
{
|
||||
result = Context.Insertable(proReportwork01).ExecuteCommand();
|
||||
Context.Updateable<ProWorkorder>().Where(it => it.Workorder == workorder)
|
||||
.SetColumns(it => it.CustomerOrder == customer_order)
|
||||
.ExecuteCommand();
|
||||
//出货工序
|
||||
Context.Updateable<ProWorkorder>()
|
||||
.SetColumns(it => it.ShipmentNum == finish_num)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
return result > 0;
|
||||
|
||||
Reference in New Issue
Block a user