|
@@ -91,6 +91,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
@Resource
|
|
|
SysUserRoleService sysUserRoleService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TBServiceService tbServiceService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询动态sop表名是否存在
|
|
|
*
|
|
@@ -696,6 +699,16 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
Optional.ofNullable(crmProjectResult).orElseThrow(() -> ExceptionResultEnum.CRM_NO_NO_DATA.exception());
|
|
|
Optional.ofNullable(crmProjectResult.getRegionManagerId()).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("crm大区经理数据为空"));
|
|
|
|
|
|
+ TBService tbService = tbServiceService.getById(crmProjectResult.getServiceUnitId());
|
|
|
+ Optional.ofNullable(tbService).orElseThrow(() -> ExceptionResultEnum.SERVICE_NO_DATA.exception());
|
|
|
+
|
|
|
+ if (Objects.isNull(tbService.getEnable()) || !tbService.getEnable()) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("服务单元已作废");
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(tbService.getStatus()) && tbService.getStatus() != ServiceStatusEnum.PUBLISH) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("只有发布状态的服务单元才能新增sop");
|
|
|
+ }
|
|
|
+
|
|
|
TFCustomFlow tfCustomFlow = null;
|
|
|
TBSopInfoDetail tbSopInfoDetail = null;
|
|
|
List<String> approveUserIds = new ArrayList<>();
|