|
@@ -701,11 +701,12 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
|
|
|
TBService tbService = tbServiceService.getById(crmProjectResult.getServiceUnitId());
|
|
|
Optional.ofNullable(tbService).orElseThrow(() -> ExceptionResultEnum.SERVICE_NO_DATA.exception());
|
|
|
+ Optional.ofNullable(tbService.getStatus()).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("服务单元状态为空"));
|
|
|
|
|
|
if (Objects.isNull(tbService.getEnable()) || !tbService.getEnable()) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("服务单元已作废");
|
|
|
}
|
|
|
- if (Objects.nonNull(tbService.getStatus()) && tbService.getStatus() != ServiceStatusEnum.PUBLISH) {
|
|
|
+ if (tbService.getStatus() != ServiceStatusEnum.PUBLISH) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("只有发布状态的服务单元才能新增sop");
|
|
|
}
|
|
|
|