This commit is contained in:
2024-03-12 22:23:00 +08:00
parent 5fd37e3ad5
commit 6b28c35c00
7 changed files with 80 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ package cn.lihongjie.coal.empSalaryItem.service;
import cn.lihongjie.coal.base.dto.CommonQuery;
import cn.lihongjie.coal.base.dto.IdRequest;
import cn.lihongjie.coal.base.service.BaseService;
import cn.lihongjie.coal.empSalary.entity.EmpSalaryEntity;
import cn.lihongjie.coal.empSalaryBatch.entity.EmpSalaryBatchEntity;
import cn.lihongjie.coal.empSalaryItem.dto.CreateEmpSalaryItemDto;
import cn.lihongjie.coal.empSalaryItem.dto.EmpSalaryItemDto;
import cn.lihongjie.coal.empSalaryItem.dto.UpdateEmpSalaryItemDto;
@@ -20,6 +22,8 @@ import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Slf4j
@Transactional
@@ -68,4 +72,20 @@ public class EmpSalaryItemService
return page.map(this.mapper::toDto);
}
public void calculateSalary(EmpSalaryBatchEntity batch, List<EmpSalaryEntity> list) {
// 获取所有的工资项目
// 准备计算上下文
// 计算工资项目
}
}

View File

@@ -2,8 +2,11 @@ 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.EmpCertVO;
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
import jakarta.persistence.ElementCollection;
import lombok.Data;
import org.hibernate.annotations.Comment;
@@ -68,4 +71,8 @@ public class CreateEmployeeDto extends OrgCommonDto {
@Comment("家庭成员")
private List<EmpFamilyMemberVO> familyMembers;
@ElementCollection
@Comment("员工证件信息")
private List<EmpCertVO> certs;
}

View File

@@ -2,9 +2,11 @@ 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.EmpCertVO;
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
import cn.lihongjie.coal.file.entity.FileEntity;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
@@ -108,4 +110,8 @@ public class EmployeeDto extends OrgCommonDto {
@Comment("家庭成员")
private List<EmpFamilyMemberVO> familyMembers;
@ElementCollection
@Comment("员工证件信息")
private List<EmpCertVO> certs;
}

View File

@@ -2,8 +2,11 @@ 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.EmpCertVO;
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
import jakarta.persistence.ElementCollection;
import lombok.Data;
import org.hibernate.annotations.Comment;
@@ -68,4 +71,9 @@ public class UpdateEmployeeDto extends OrgCommonDto {
@Comment("家庭成员")
private List<EmpFamilyMemberVO> familyMembers;
@ElementCollection
@Comment("员工证件信息")
private List<EmpCertVO> certs;
}

View File

@@ -0,0 +1,31 @@
package cn.lihongjie.coal.employee.entity;
import jakarta.persistence.Embeddable;
import lombok.Data;
import org.hibernate.annotations.Comment;
import java.time.LocalDate;
import java.util.*;
@Data
@Embeddable
public class EmpCertVO {
@Comment("证书名称")
private String name;
@Comment("发证机构")
private String orgName;
@Comment("发证日期")
private LocalDate issueDate;
@Comment("证书编号")
private String certNo;
@Comment("有效期截止日期")
private LocalDate validDate;
@Comment("备注")
private String remarks;
}

View File

@@ -145,4 +145,9 @@ public class EmployeeEntity extends OrgCommonEntity {
@ElementCollection
@Comment("家庭成员")
private List<EmpFamilyMemberVO> familyMembers;
@ElementCollection
@Comment("员工证件信息")
private List<EmpCertVO> certs;
}

View File

@@ -60,9 +60,9 @@ public class SubmitTokenFilter extends OncePerRequestFilter {
}
if (request.getAttribute(Constants.HTTP_ATTR_RESOURCE) != null) {
if (BooleanUtils.isFalse(
((ResourceDto) request.getAttribute(Constants.HTTP_ATTR_RESOURCE))
.getSubmitToken())) {
Boolean submitToken = ((ResourceDto) request.getAttribute(Constants.HTTP_ATTR_RESOURCE))
.getSubmitToken();
if (submitToken == null || BooleanUtils.isFalse(submitToken)) {
doFilter(request, response, filterChain);
return;
}