|
|
@ -44,7 +44,7 @@ public class SparePartIssueJobsController : AbpController |
|
|
|
if (jobStatus == "ALL") |
|
|
|
{ |
|
|
|
status.Add((int)EnumJobStatus.Open); |
|
|
|
status.Add((int)EnumJobStatus.Wait); |
|
|
|
//status.Add((int)EnumJobStatus.Wait);
|
|
|
|
status.Add((int)EnumJobStatus.Doing); |
|
|
|
status.Add((int)EnumJobStatus.Partial); |
|
|
|
} |
|
|
@ -162,17 +162,18 @@ public class SparePartIssueJobsController : AbpController |
|
|
|
[HttpGet("by-number/{jobNumber}")] |
|
|
|
public virtual async Task<ActionResult<SparePartIssueJobDTO>> GetByNumberAsync(string jobNumber) |
|
|
|
{ |
|
|
|
var jobDto = await _sparePartIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); |
|
|
|
//var jobDto = await _sparePartIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
|
|
|
|
var jobDto = await _sparePartIssueJobAppService.GetByNumber2Async(jobNumber).ConfigureAwait(false); |
|
|
|
if (jobDto == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); |
|
|
|
} |
|
|
|
|
|
|
|
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); |
|
|
|
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) |
|
|
|
{ |
|
|
|
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); |
|
|
|
} |
|
|
|
//var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
|
|
|
|
//if (!wlgCodes.Contains(jobDto.WorkGroupCode))
|
|
|
|
//{
|
|
|
|
// return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
|
|
|
|
//}
|
|
|
|
|
|
|
|
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.ClaimsUserId != CurrentUser.Id.ToString()) |
|
|
|
{ |
|
|
|