feat: 添加VendorGroupRequireFileTypeVo及相关服务功能
refactor: 重构多个服务类和方法,优化代码结构 fix: 修复PermissionVo中code字段更名为key的问题 docs: 更新create_vo.md文档,添加新创建的VO记录 perf: 优化WebSocketClientService中的session关闭逻辑 style: 清理无用导入和注释,统一代码格式
This commit is contained in:
@@ -6,6 +6,7 @@ import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.controller.CurrentEmployeeInitialedEvent;
|
||||
import com.ecep.contract.model.EmployeeRole;
|
||||
import com.ecep.contract.service.EmployeeService;
|
||||
import com.ecep.contract.vo.EmployeeRoleVo;
|
||||
import com.ecep.contract.vo.EmployeeVo;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.property.SimpleListProperty;
|
||||
@@ -40,7 +41,7 @@ public class CurrentEmployee extends EmployeeViewModel {
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private SimpleListProperty<EmployeeRole> roles = new SimpleListProperty<>(FXCollections.observableArrayList());
|
||||
private SimpleListProperty<EmployeeRoleVo> roles = new SimpleListProperty<>(FXCollections.observableArrayList());
|
||||
|
||||
private DateTimeFormatter dateFormatter = DateTimeFormatter
|
||||
.ofPattern(MyDateTimeUtils.DEFAULT_DATE_FORMAT_PATTERN);
|
||||
@@ -61,7 +62,7 @@ public class CurrentEmployee extends EmployeeViewModel {
|
||||
* 是否系统管理员
|
||||
*/
|
||||
public boolean isSystemAdministrator() {
|
||||
return roles.stream().anyMatch(EmployeeRole::isSystemAdministrator);
|
||||
return roles.stream().anyMatch(EmployeeRoleVo::isSystemAdministrator);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,7 +75,7 @@ public class CurrentEmployee extends EmployeeViewModel {
|
||||
/**
|
||||
* 角色属性
|
||||
*/
|
||||
public SimpleListProperty<EmployeeRole> rolesProperty() {
|
||||
public SimpleListProperty<EmployeeRoleVo> rolesProperty() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
@@ -141,7 +142,7 @@ public class CurrentEmployee extends EmployeeViewModel {
|
||||
// issue #1 sss 2020-07-05
|
||||
EmployeeService employeeService = SpringApp.getBean(EmployeeService.class);
|
||||
EmployeeVo employee = employeeService.findById(getId().get());
|
||||
List<EmployeeRole> roles = employeeService.getRolesByEmployeeId(getId().get());
|
||||
List<EmployeeRoleVo> roles = employeeService.getRolesByEmployeeId(getId().get());
|
||||
Platform.runLater(() -> {
|
||||
update(employee);
|
||||
rolesProperty().setAll(roles);
|
||||
|
||||
Reference in New Issue
Block a user