工单修改
This commit is contained in:
parent
f3adb6c731
commit
7b0ad4e262
@ -159,11 +159,19 @@ namespace DOAN.Service.MES.product
|
||||
List<ProWorkorder> proWorkorderList = Context.Queryable<ProWorkorder>().Where(it => it.WorkorderDate == update_time)
|
||||
.Where(it => it.Status == 1)
|
||||
.OrderBy(it => it.Sort).ToList();
|
||||
|
||||
string maxs= Context.Queryable<ProWorkorder>().Where(it => it.WorkorderDate == update_time)
|
||||
.Where(it => it.Status == 3).Max(it => it.Workorder);
|
||||
if (proWorkorderList != null && proWorkorderList.Count() > 0)
|
||||
{
|
||||
|
||||
string baseSort = update_time.ToString("yyyyMMdd");
|
||||
int index = 1;
|
||||
if (!string.IsNullOrEmpty(maxs))
|
||||
{
|
||||
index = Convert.ToInt32(maxs.Substring(maxs.Length - 3))+1;
|
||||
|
||||
}
|
||||
|
||||
foreach (ProWorkorder item in proWorkorderList)
|
||||
{
|
||||
item.Workorder = baseSort + index.ToString("000");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user