|
@@ -2190,23 +2190,29 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
|
|
|
Date date = new Date();
|
|
|
+
|
|
|
+ Boolean hasRole = employeePositionService.getDao().hasRole("一键退团",reqMusicGroupQuit.getOperatorId(),reqMusicGroupQuit.getTenantId());
|
|
|
|
|
|
//如果发起退团申请的是乐团主管
|
|
|
if (!currentOperatorRoleIds.contains(SysUserRoleEnum.ORGAN_MANAGER) && currentOperatorRoleIds.contains(SysUserRoleEnum.EDUCATION)) {
|
|
|
|
|
|
- if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.EDUCATION.ordinal() + 1 + "")) {
|
|
|
- throw new BizException("只有分部经理才能审核");
|
|
|
- }
|
|
|
-
|
|
|
- if (status == ApprovalStatus.APPROVED) {
|
|
|
- throw new BizException("只能分部经理操作退团");
|
|
|
- }
|
|
|
+ if(hasRole == false) {
|
|
|
+ if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.EDUCATION.ordinal() + 1 + "")) {
|
|
|
+ throw new BizException("只有分部经理才能审核");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (status == ApprovalStatus.APPROVED) {
|
|
|
+ throw new BizException("只能分部经理操作退团");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (currentOperatorRoleIds.contains(SysUserRoleEnum.ORGAN_MANAGER) && !currentOperatorRoleIds.contains(SysUserRoleEnum.EDUCATION)) {
|
|
|
- if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.ORGAN_MANAGER.ordinal() + 1 + "")) {
|
|
|
- throw new BizException("先需乐团主管审核");
|
|
|
- }
|
|
|
+ if(hasRole == false) {
|
|
|
+ if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.ORGAN_MANAGER.ordinal() + 1 + "")) {
|
|
|
+ throw new BizException("先需乐团主管审核");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String musicGroupId = musicGroupQuit.getMusicGroupId();
|
|
@@ -2239,7 +2245,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
if(reqMusicGroupQuit.getStatus() != APPROVED){
|
|
|
//是否是特定的可以一键退团的乐团主管
|
|
|
- Boolean hasRole = employeePositionService.getDao().hasRole("一键退团",reqMusicGroupQuit.getOperatorId(),reqMusicGroupQuit.getTenantId());
|
|
|
if(hasRole){
|
|
|
status = APPROVED;
|
|
|
}
|