213
This commit is contained in:
parent
c15cb5d6e7
commit
64afa6a8ca
@ -199,7 +199,7 @@ namespace DOAN.Service.MES.product
|
||||
int result = 0;
|
||||
proWorkorder.Id = XueHua;
|
||||
proWorkorder.WorkorderDate = proWorkorder.WorkorderDate.Value.Date;
|
||||
if(!string.IsNullOrEmpty(next_id))
|
||||
if(!string.IsNullOrEmpty(next_id)&&next_id!="-1")
|
||||
{
|
||||
UseTran2(() =>
|
||||
{
|
||||
@ -219,9 +219,12 @@ namespace DOAN.Service.MES.product
|
||||
}
|
||||
else
|
||||
{
|
||||
int sortNum = Context.Queryable<ProWorkorder>().Max(it => it.Sort.Value);
|
||||
DateTime dateOnly= proWorkorder.WorkorderDate.Value.Date;
|
||||
|
||||
int sortNum = Context.Queryable<ProWorkorder>().Where(it=>it.WorkorderDate== dateOnly).Max(it => it.Sort.Value);
|
||||
|
||||
proWorkorder.Sort = sortNum+10;
|
||||
|
||||
proWorkorder.Status = 1;
|
||||
|
||||
Context.Insertable(proWorkorder).ExecuteCommand();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user