|
@@ -978,8 +978,8 @@ public class OrderController : BaseController
|
|
|
[HttpPost("screen/startflow")]
|
|
|
public async Task StartFlow([FromBody] ScreenStartFlowDto dto)
|
|
|
{
|
|
|
- int screenCount = await _orderScreenRepository.CountAsync(x => x.VisitDetailId == dto.Data.VisitDetailId && (x.Status == EScreenStatus.Apply || x.Status == EScreenStatus.Approval));
|
|
|
- if (screenCount > 0)
|
|
|
+ var screenAny = await _orderScreenRepository.AnyAsync(x => x.VisitDetailId == dto.Data.VisitDetailId && (x.Status == EScreenStatus.Apply || x.Status == EScreenStatus.Approval));
|
|
|
+ if (screenAny)
|
|
|
throw UserFriendlyException.SameMessage("该工单已提起甄别申请,正在审批过程中,不能申请");
|
|
|
|
|
|
var setting = _systemSettingCacheManager.GetSetting(SettingConstants.ScreenApplyNum);
|