mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-10-10 12:06:39 +08:00
Compare commits
2 Commits
529f1e5dbb
...
8f95374cef
Author | SHA1 | Date | |
---|---|---|---|
|
8f95374cef | ||
|
7471fa7ee0 |
@ -77,4 +77,9 @@ public interface SystemConstants {
|
||||
*/
|
||||
String ROOT_DEPT_ANCESTORS = "0";
|
||||
|
||||
/**
|
||||
* 默认部门 ID
|
||||
*/
|
||||
Long DEFAULT_DEPT_ID = 100L;
|
||||
|
||||
}
|
||||
|
@ -113,6 +113,9 @@ public class SysDeptController extends BaseController {
|
||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deptId}")
|
||||
public R<Void> remove(@PathVariable Long deptId) {
|
||||
if (SystemConstants.DEFAULT_DEPT_ID.equals(deptId)) {
|
||||
return R.warn("默认部门,不允许删除");
|
||||
}
|
||||
if (deptService.hasChildByDeptId(deptId)) {
|
||||
return R.warn("存在下级部门,不允许删除");
|
||||
}
|
||||
|
@ -106,15 +106,10 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
|
||||
.map(entry -> {
|
||||
String storageId = entry.getKey();
|
||||
Pair<TaskAssigneeEnum, Long> parsed = entry.getValue();
|
||||
String handlerName = "格式错误";
|
||||
if (parsed != null) {
|
||||
Map<Long, String> nameMapping = nameMap.getOrDefault(parsed.getKey(), Collections.emptyMap());
|
||||
handlerName = nameMapping.getOrDefault(parsed.getValue(), "未知名称");
|
||||
}
|
||||
HandlerFeedBackVo backVo = new HandlerFeedBackVo();
|
||||
backVo.setStorageId(storageId);
|
||||
backVo.setHandlerName(handlerName);
|
||||
return backVo;
|
||||
String handlerName = (parsed == null) ? null
|
||||
: nameMap.getOrDefault(parsed.getKey(), Collections.emptyMap())
|
||||
.get(parsed.getValue());
|
||||
return new HandlerFeedBackVo(storageId, handlerName);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user