mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
添加员工车辆信息
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.employee.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.department.entity.DepartmentEntity;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCarVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCertVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
|
||||
|
||||
@@ -77,6 +78,10 @@ public class CreateEmployeeDto extends OrgCommonDto {
|
||||
@Comment("员工证件信息")
|
||||
private List<EmpCertVO> certs;
|
||||
|
||||
@ElementCollection
|
||||
@Comment("员工车辆信息")
|
||||
private List<EmpCarVO> cars;
|
||||
|
||||
@Comment("养老保险基数")
|
||||
private Double insurance1Base;
|
||||
@Comment("养老保险比例")
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.employee.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.department.entity.DepartmentEntity;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCarVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCertVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
|
||||
import cn.lihongjie.coal.file.entity.FileEntity;
|
||||
@@ -115,6 +116,10 @@ public class EmployeeDto extends OrgCommonDto {
|
||||
@Comment("员工证件信息")
|
||||
private List<EmpCertVO> certs;
|
||||
|
||||
@ElementCollection
|
||||
@Comment("员工车辆信息")
|
||||
private List<EmpCarVO> cars;
|
||||
|
||||
|
||||
@Comment("养老保险基数")
|
||||
private Double insurance1Base;
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.employee.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.department.entity.DepartmentEntity;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCarVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCertVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
|
||||
|
||||
@@ -74,10 +75,15 @@ public class UpdateEmployeeDto extends OrgCommonDto {
|
||||
private List<EmpFamilyMemberVO> familyMembers;
|
||||
|
||||
|
||||
|
||||
|
||||
@ElementCollection
|
||||
@Comment("员工证件信息")
|
||||
private List<EmpCertVO> certs;
|
||||
|
||||
@ElementCollection
|
||||
@Comment("员工车辆信息")
|
||||
private List<EmpCarVO> cars;
|
||||
@Comment("养老保险基数")
|
||||
private Double insurance1Base;
|
||||
@Comment("养老保险比例")
|
||||
|
||||
@@ -41,6 +41,8 @@ public class EmpCertVO {
|
||||
@Type(ListArrayType.class)
|
||||
private List<String> fileIds;
|
||||
|
||||
|
||||
|
||||
@Transient
|
||||
private List<FileEntity> files;
|
||||
|
||||
|
||||
@@ -71,6 +71,15 @@ class EmployeeService extends BaseService<EmployeeEntity, EmployeeRepository> {
|
||||
x.setFiles(fileService.findAllByIds(x.getFileIds()));
|
||||
});
|
||||
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(dto.getCars())) {
|
||||
dto.getCars()
|
||||
.forEach(
|
||||
x -> {
|
||||
if (CollectionUtils.isNotEmpty(x.getFileIds()))
|
||||
x.setFiles(fileService.findAllByIds(x.getFileIds()));
|
||||
});
|
||||
|
||||
}
|
||||
return dto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user