|
|
@@ -359,15 +359,26 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services |
|
|
|
[HttpPost] |
|
|
|
public async Task<bool> UpdateWorkCraftStepsStatus(WorkInfoCraftstepRecordUpdateInput input) |
|
|
|
{ |
|
|
|
WorkInfoCraftstepRecordEntity entity = new() |
|
|
|
if (!string.IsNullOrEmpty(input.WorkId)) |
|
|
|
{ |
|
|
|
Id = input.WorkCraftstepId, |
|
|
|
Status = input.Status, |
|
|
|
UpdateTime = DateTime.Now |
|
|
|
}; |
|
|
|
bool res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); |
|
|
|
return res; |
|
|
|
bool res = await _dbContext.Updateable<WorkInfoCraftstepRecordEntity>() |
|
|
|
.SetColumns(x=>x.Status==input.Status) |
|
|
|
.SetColumns(x=>x.UpdateTime==DateTime.Now).IgnoreColumns(true).Where(x=>x.WorkId==input.WorkId && x.PotNum==input.PotNum).ExecuteCommandHasChangeAsync(); |
|
|
|
return res; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
WorkInfoCraftstepRecordEntity entity = new() |
|
|
|
{ |
|
|
|
Id = input.WorkCraftstepId, |
|
|
|
Status = input.Status, |
|
|
|
UpdateTime = DateTime.Now |
|
|
|
}; |
|
|
|
bool res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 强制结束工单 |
|
|
|
/// </summary> |
|
|
|