Commit e185899f authored by hongguangwu's avatar hongguangwu

人员档案相关-最终

parent 4de7b702
...@@ -30,6 +30,8 @@ import javax.validation.constraints.NotNull; ...@@ -30,6 +30,8 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/** /**
* 人员档案表 * 人员档案表
...@@ -290,40 +292,15 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -290,40 +292,15 @@ public class TEmployeeInfo extends BaseEntity {
private String deleteFlag; private String deleteFlag;
/** /**
* 创建人id * 减档操作人id
*/ */
@Schema(description = "创建人id") @Schema(description = "减档操作人id")
private String createBy; private String leaveUser;
/**
* 创建人姓名
*/
@Schema(description = "创建人姓名")
private String createName;
/**
* 创建时间
*/
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人id
*/
@Schema(description = "更新人id")
private String updateBy;
/**
* 更新时间
*/
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/** /**
* 离职操作人id * 减档操作人姓名
*/ */
@Schema(description = "离职操作人id") @Schema(description = "离职操作姓名")
private String leaveUser; private String leaveUserName;
/** /**
* 离职时间 * 离职时间
...@@ -350,6 +327,14 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -350,6 +327,14 @@ public class TEmployeeInfo extends BaseEntity {
private String contactAddress; private String contactAddress;
// 以下是项目档案信息 // 以下是项目档案信息
@TableField(exist = false)
@Schema(description = "单位名称")
private String unitName;
@TableField(exist = false)
@Schema(description = "单位编码")
private String unitNo;
@TableField(exist = false) @TableField(exist = false)
@Schema(description = "项目id") @Schema(description = "项目id")
private String deptId; private String deptId;
...@@ -366,5 +351,12 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -366,5 +351,12 @@ public class TEmployeeInfo extends BaseEntity {
@Schema(description = "就职岗位") @Schema(description = "就职岗位")
private String post; private String post;
@TableField(exist = false)
@Schema(description = "选中的idList")
private List<String> idList;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 人员档案表excel导出对应的实体
*
* @author hgw
* @date 2022-6-24 15:15:24
*/
@Data
@ColumnWidth(10)
public class EmployeeExportVO extends BaseEntity {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "员工主码")
private String empCode;
@ExcelProperty(value = "员工类型")
private String empNatrue;
@ExcelProperty(value = "姓名")
private String empName;
@ColumnWidth(20)
@ExcelProperty(value = "身份证号")
private String empIdcard;
@ExcelProperty(value = "身份证开始日期")
private LocalDateTime validityStart;
@ExcelProperty(value = "身份证截止日期")
private LocalDateTime validityEnd;
@ExcelProperty(value = "婚姻状况")
private String empMarriStatus;
@ExcelProperty(value = "民族")
private String empNational;
@ExcelProperty(value = "政治面貌")
private String politicalStatus;
@ExcelProperty(value = "手机号码")
private String empPhone;
@ExcelProperty(value = "邮箱")
private String empEmail;
@ExcelProperty(value = "户籍所在省")
private String idProvince;
@ExcelProperty(value = "户籍所在市")
private String idCity;
@ExcelProperty(value = "户籍所在县")
private String idTown;
@ExcelProperty(value = "户口性质")
private String empRegisType;
@ExcelProperty(value = "档案所在省")
private String fileProvince;
@ExcelProperty(value = "档案所在市")
private String fileCity;
@ExcelProperty(value = "档案所在县")
private String fileTown;
@ExcelProperty(value = "是否大专及以上")
private String isCollege;
@ExcelProperty(value = "最高学历")
private String hignEducation;
@ExcelProperty(value = "学校")
private String school;
@ExcelProperty(value = "专业")
private String major;
@ExcelProperty(value = "入学时间")
private LocalDateTime admissionDate;
@ExcelProperty(value = "毕业时间")
private LocalDateTime gradutionDate;
@ExcelProperty(value = "档案备注")
private String remark;
/**
* 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
*/
@ExcelProperty(value = "人员档案来源")
private String fileSource;
@ExcelProperty(value = "是否多项目")
private String isProjects;
@ExcelProperty(value = "现存项目数")
private Integer projectNum;
@ExcelProperty(value = "项目名称")
private String deptName;
@ExcelProperty(value = "项目编码")
private String deptNo;
/**
* 员工合同状态(字典)
*/
@ExcelProperty(value = "合同状态")
private Integer contractStatus;
/**
* 商险状态(字典)
*/
@ExcelProperty(value = "商险状态")
private Integer insuranceStatus;
/**
* 社保状态(字典)
*/
@ExcelProperty(value = "社保状态")
private Integer socialStatus;
/**
* 公积金状态(字典)
*/
@ExcelProperty(value = "公积金状态")
private Integer fundStatus;
/**
* 近3个月发薪(0否;1是)
*/
@ExcelProperty(value = "近3个月发薪")
private Integer salaryStatus;
@ExcelProperty(value = "创建人")
private String createName;
@ExcelProperty(value = "创建时间")
private LocalDateTime proCreateTime;
@ExcelProperty(value = "减档操作人")
private String leaveUserName;
@ExcelProperty(value = "减档时间")
private LocalDateTime leaveTime;
@ExcelProperty(value = "减档原因")
private String leaveReason;
@ExcelProperty(value = "减档备注")
private String leaveRemark;
/**
* 通信地址
*/
@ExcelProperty(value = "通信地址")
private String contactAddress;
@ExcelProperty(value = "单位名称")
private String unitName;
@ExcelProperty(value = "单位编码")
private String unitNo;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* 人员档案表-批量减档
*
* @author hgw
* @date 2022-6-24 16:04:53
*/
@Data
@ColumnWidth(30)
public class EmployeeLeaveVO implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "姓名")
@Size(max = 20, message = "姓名不可超过20位")
private String empName;
@ExcelProperty(value = "身份证号")
@Size(max = 20, message = "身份证号不可超过20位")
private String empIdcard;
@ExcelProperty(value = "减档原因")
@Size(max = 32, message = "减档原因不可超过32位")
private String leaveReason;
@ExcelProperty(value = "减档备注")
@Size(max = 255, message = "减档原因不可超过255位")
private String leaveRemark;
}
...@@ -24,6 +24,7 @@ import com.pig4cloud.plugin.excel.vo.ErrorMessage; ...@@ -24,6 +24,7 @@ import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeLeaveVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -46,6 +47,7 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -46,6 +47,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
...@@ -82,7 +84,7 @@ public class TEmployeeInfoController { ...@@ -82,7 +84,7 @@ public class TEmployeeInfoController {
public R<IPage<TEmployeeInfo>> getTEmployeeInfoPage(Page<TEmployeeInfo> page, TEmployeeInfo tEmployeeInfo) { public R<IPage<TEmployeeInfo>> getTEmployeeInfoPage(Page<TEmployeeInfo> page, TEmployeeInfo tEmployeeInfo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
return R.failed("请登录!"); return R.failed(CommonConstants.PLEASE_LOG_IN);
} }
// 普通用户: // 普通用户:
if (CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) { if (CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
...@@ -120,8 +122,9 @@ public class TEmployeeInfoController { ...@@ -120,8 +122,9 @@ public class TEmployeeInfoController {
} }
} }
} }
if (!Common.isEmpty(obj)) { if (Common.isNotNull(obj)) {
SimpleValueWrapper objs = (SimpleValueWrapper) obj; SimpleValueWrapper objs = (SimpleValueWrapper) obj;
if (objs != null) {
String sql = String.valueOf(objs.get()); String sql = String.valueOf(objs.get());
if (sql.contains("#deptId")) { if (sql.contains("#deptId")) {
// TODO - 需要关联部门表 // TODO - 需要关联部门表
...@@ -142,6 +145,7 @@ public class TEmployeeInfoController { ...@@ -142,6 +145,7 @@ public class TEmployeeInfoController {
return R.ok(tEmployeeInfoService.getPage(page, tEmployeeInfo, sql)); return R.ok(tEmployeeInfoService.getPage(page, tEmployeeInfo, sql));
} }
} }
}
return R.ok(tEmployeeInfoService.getPage(page, tEmployeeInfo, null)); return R.ok(tEmployeeInfoService.getPage(page, tEmployeeInfo, null));
} }
...@@ -222,7 +226,7 @@ public class TEmployeeInfoController { ...@@ -222,7 +226,7 @@ public class TEmployeeInfoController {
} }
/** /**
* @param ids * @param idList
* @Description: 通过ids删除人员档案表 * @Description: 通过ids删除人员档案表
* @Author: hgw * @Author: hgw
* @Date: 2022/6/21 19:42 * @Date: 2022/6/21 19:42
...@@ -232,8 +236,8 @@ public class TEmployeeInfoController { ...@@ -232,8 +236,8 @@ public class TEmployeeInfoController {
@SysLog("通过ids批量删除人员档案表") @SysLog("通过ids批量删除人员档案表")
@GetMapping("/batchDeleteEmployee") @GetMapping("/batchDeleteEmployee")
@PreAuthorize("@pms.hasPermission('temployeeinfo_batch_del')") @PreAuthorize("@pms.hasPermission('temployeeinfo_batch_del')")
public R<List<ErrorMessage>> batchDeleteEmployee(@RequestParam String ids) { public R<List<ErrorMessage>> batchDeleteEmployee(@RequestBody List<String> idList) {
return tEmployeeInfoService.batchDeleteEmployee(ids); return tEmployeeInfoService.batchDeleteEmployee(idList);
} }
/** /**
...@@ -247,23 +251,24 @@ public class TEmployeeInfoController { ...@@ -247,23 +251,24 @@ public class TEmployeeInfoController {
@SysLog("通过id减档人员档案表") @SysLog("通过id减档人员档案表")
@GetMapping("/minusEmployee") @GetMapping("/minusEmployee")
@PreAuthorize("@pms.hasPermission('temployeeinfo_minus')") @PreAuthorize("@pms.hasPermission('temployeeinfo_minus')")
public R<String> minusEmployee(@RequestParam String id) { public R<String> minusEmployee(@RequestParam String id, @RequestParam String leaveReason
return tEmployeeInfoService.minusEmployee(id); , @RequestParam(required = false) String leaveRemark) {
return tEmployeeInfoService.minusEmployee(id, leaveReason, leaveRemark);
} }
/** /**
* @param ids * @param idList
* @Description: 通过ids批量减档人员档案表 * @Description: 通过ids批量减档人员档案表
* @Author: hgw * @Author: hgw
* @Date: 2022/6/21 19:42 * @Date: 2022/6/21 19:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
@Operation(summary = "通过ids批量减档人员档案表", description = "通过ids批量减档人员档案表") @Operation(summary = "批量减档人员档案表", description = "批量减档人员档案表")
@SysLog("通过ids批量减档人员档案表") @SysLog("批量减档人员档案表")
@GetMapping("/batchMinusEmployee") @GetMapping("/batchMinusEmployee")
@PreAuthorize("@pms.hasPermission('temployeeinfo_batch_minus')") @PreAuthorize("@pms.hasPermission('temployeeinfo_batch_minus')")
public R<List<ErrorMessage>> batchMinusEmployee(@RequestParam String ids) { public R<List<ErrorMessage>> batchMinusEmployee(@RequestExcel List<EmployeeLeaveVO> excelList, BindingResult bindingResult) {
return tEmployeeInfoService.batchMinusEmployee(ids); return tEmployeeInfoService.batchMinusEmployee(excelList, bindingResult);
} }
/** /**
...@@ -290,7 +295,7 @@ public class TEmployeeInfoController { ...@@ -290,7 +295,7 @@ public class TEmployeeInfoController {
* @Date: 2022/6/22 11:57 * @Date: 2022/6/22 11:57
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>>
**/ **/
@Operation(description = "批量导入人员档案 hasPermission('employee_batch_import') 额外属性:isCanAdd:0不可以复档复项;1允许复档复项") @Operation(summary = "批量导入人员档案", description = "批量导入人员档案 hasPermission('employee_batch_import') 额外属性:isCanAdd:0不可以复档复项;1允许复档复项")
@SysLog("批量导入人员档案") @SysLog("批量导入人员档案")
@PostMapping("/batchImportEmployee") @PostMapping("/batchImportEmployee")
@PreAuthorize("@pms.hasPermission('employee_batch_import')") @PreAuthorize("@pms.hasPermission('employee_batch_import')")
...@@ -306,7 +311,7 @@ public class TEmployeeInfoController { ...@@ -306,7 +311,7 @@ public class TEmployeeInfoController {
* @Date: 2022/6/22 20:29 * @Date: 2022/6/22 20:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>>
**/ **/
@Operation(description = "批量更新人员档案 hasPermission('employee_batch_update')") @Operation(summary = "批量更新人员档案", description = "批量更新人员档案 hasPermission('employee_batch_update')")
@SysLog("批量更新人员档案") @SysLog("批量更新人员档案")
@PostMapping("/batchUpdateEmployee") @PostMapping("/batchUpdateEmployee")
@PreAuthorize("@pms.hasPermission('employee_batch_update')") @PreAuthorize("@pms.hasPermission('employee_batch_update')")
...@@ -314,4 +319,32 @@ public class TEmployeeInfoController { ...@@ -314,4 +319,32 @@ public class TEmployeeInfoController {
return tEmployeeInfoService.batchUpdateEmployee(excelList, bindingResult); return tEmployeeInfoService.batchUpdateEmployee(excelList, bindingResult);
} }
/**
* 批量导出人员档案信息
*
* @Author hgw
* @Date 2022-6-24 09:36:06
**/
@Operation(summary = "批量导出人员档案信息", description = "批量导出人员档案信息 hasPermission('employee_export_employee')")
@SysLog("批量导出人员档案信息")
// @ResponseExcel
@PostMapping("/exportEmployee")
public void exportEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
tEmployeeInfoService.exportEmployee(employeeInfo, response);
}
/**
* 批量导出离职档案信息
*
* @Author hgw
* @Date 2022-6-24 09:36:06
**/
@Operation(summary = "批量导出离职档案信息", description = "批量导出离职档案信息 hasPermission('employee_export_employee_leave')")
@SysLog("批量导出离职档案信息")
// @ResponseExcel
@PostMapping("/exportLeaveEmployee")
public void exportLeaveEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
tEmployeeInfoService.exportLeaveEmployee(employeeInfo, response);
}
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -51,4 +52,17 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> { ...@@ -51,4 +52,17 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
void updateExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list); void updateExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list);
int insertExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list); int insertExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list);
/**
* 获得导出的人员档案列表
* hgw 2022-6-24 10:09:44
*/
List<EmployeeExportVO> getTEmployeeExportList(@Param("tEmployeeInfo") TEmployeeInfo tEmployeeInfo);
/**
* 获得导出的离职档案列表
* hgw 2022-6-24 10:09:44
*/
List<EmployeeExportVO> getTEmployeeLeaveExportList(@Param("tEmployeeInfo") TEmployeeInfo tEmployeeInfo);
} }
...@@ -23,10 +23,12 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,10 +23,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeLeaveVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
...@@ -94,13 +96,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -94,13 +96,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
R<String> deleteEmployee(String id); R<String> deleteEmployee(String id);
/** /**
* @param ids
* @Description: 批量删除 * @Description: 批量删除
* @Author: hgw * @Author: hgw
* @Date: 2022/6/23 16:45 * @Date: 2022/6/23 16:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
R<List<ErrorMessage>> batchDeleteEmployee(String ids); R<List<ErrorMessage>> batchDeleteEmployee(List<String> idList);
/** /**
* @param id * @param id
...@@ -109,7 +110,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -109,7 +110,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
* @Date: 2022/6/21 19:50 * @Date: 2022/6/21 19:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
R<String> minusEmployee(String id); R<String> minusEmployee(String id, String leaveReason, String leaveRemark);
/** /**
* @param id * @param id
...@@ -121,13 +122,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -121,13 +122,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
R<String> restoreEmployee(String id, String projectIds); R<String> restoreEmployee(String id, String projectIds);
/** /**
* @param ids
* @Description: 批量减档 * @Description: 批量减档
* @Author: hgw * @Author: hgw
* @Date: 2022/6/23 17:12 * @Date: 2022/6/23 17:12
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>>
**/ **/
R<List<ErrorMessage>> batchMinusEmployee(String ids); R<List<ErrorMessage>> batchMinusEmployee(List<EmployeeLeaveVO> excelVOList, BindingResult bindingResult);
/** /**
* @param employeeInfo 档案信息 * @param employeeInfo 档案信息
...@@ -158,4 +158,21 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -158,4 +158,21 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
R<List<ErrorMessage>> batchUpdateEmployee(List<EmployeeVO> excelVOList, BindingResult bindingResult); R<List<ErrorMessage>> batchUpdateEmployee(List<EmployeeVO> excelVOList, BindingResult bindingResult);
void updateEducationOfEmp(EmpEducationUpdateVO education); void updateEducationOfEmp(EmpEducationUpdateVO education);
/**
* @param employeeVo
* @Description: 批量导出人员档案
* @Author: hgw
* @Date: 2022/6/23 10:302022-6-24 09:35:54
**/
void exportEmployee(TEmployeeInfo employeeVo, HttpServletResponse response);
/**
* @param employeeVo
* @Description: 批量导出离职档案
* @Author: hgw
* @Date: 2022/6/23 10:302022-6-24 09:35:54
**/
void exportLeaveEmployee(TEmployeeInfo employeeVo, HttpServletResponse response);
} }
...@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; ...@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -392,7 +393,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -392,7 +393,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
insTEmployeeInfo.setDeleteFlag(CommonConstants.STATUS_NORMAL); insTEmployeeInfo.setDeleteFlag(CommonConstants.STATUS_NORMAL);
insTEmployeeInfo.setStatus(CommonConstants.dingleDigitIntArray[0]); insTEmployeeInfo.setStatus(CommonConstants.dingleDigitIntArray[0]);
//TODO HUYC 员工编码生成规则 //TODO HUYC 员工编码生成规则
insTEmployeeInfo.setEmpCode(""); insTEmployeeInfo.setEmpCode("查询人员档案的编码");
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
insTEmployeeInfo.setCreateBy(user.getId()); insTEmployeeInfo.setCreateBy(user.getId());
insTEmployeeInfo.setCreateName(user.getNickname()); insTEmployeeInfo.setCreateName(user.getNickname());
...@@ -420,7 +421,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -420,7 +421,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
insTEmployeePro.setEmpNo(str); insTEmployeePro.setEmpNo(str);
//员工编码生成规则 //员工编码生成规则
insTEmployeePro.setEmpCode(this.getCode()); insTEmployeePro.setEmpCode("查询人员档案的编码");
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
insTEmployeePro.setCreateBy(user.getId()); insTEmployeePro.setCreateBy(user.getId());
insTEmployeePro.setCreateName(user.getNickname()); insTEmployeePro.setCreateName(user.getNickname());
...@@ -439,11 +440,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -439,11 +440,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CODE); Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CODE);
Object nowNumObj = cache.get(nowDay); Object nowNumObj = cache.get(nowDay);
int nowNums = 1; int nowNums = 1;
if (!Common.isEmpty(nowNumObj)) { if (Common.isNotNull(nowNumObj)) {
nowNums = (Integer) nowNumObj + 1; SimpleValueWrapper value = (SimpleValueWrapper) nowNumObj;
nowNums = (Integer) value.get() + 1;
} }
cache.put(nowDay, nowNums); cache.put(nowDay, nowNums);
return this.getFiveNum(String.valueOf(nowNums)); return "ZM" + nowDay + this.getFiveNum(String.valueOf(nowNums));
} }
/** /**
...@@ -563,7 +565,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -563,7 +565,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
public void saveEmployeeProjectInfo(TEmployeeInfo employeeInfo) { public void saveEmployeeProjectInfo(TEmployeeInfo employeeInfo) {
TEmployeeProject tEmployeeProject = new TEmployeeProject(); TEmployeeProject tEmployeeProject = new TEmployeeProject();
tEmployeeProject.setEmpId(employeeInfo.getId()); tEmployeeProject.setEmpId(employeeInfo.getId());
tEmployeeProject.setEmpCode(this.getCode()); tEmployeeProject.setEmpCode(employeeInfo.getEmpCode());
tEmployeeProject.setEmpNatrue(employeeInfo.getEmpNatrue()); tEmployeeProject.setEmpNatrue(employeeInfo.getEmpNatrue());
tEmployeeProject.setEmpName(employeeInfo.getEmpName()); tEmployeeProject.setEmpName(employeeInfo.getEmpName());
tEmployeeProject.setEmpIdcard(employeeInfo.getEmpIdcard()); tEmployeeProject.setEmpIdcard(employeeInfo.getEmpIdcard());
......
...@@ -69,12 +69,61 @@ ...@@ -69,12 +69,61 @@
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="leaveUser" column="LEAVE_USER"/> <result property="leaveUser" column="LEAVE_USER"/>
<result property="leaveUserName" column="LEAVE_USER_NAME"/>
<result property="leaveTime" column="LEAVE_TIME"/> <result property="leaveTime" column="LEAVE_TIME"/>
<result property="leaveReason" column="LEAVE_REASON"/> <result property="leaveReason" column="LEAVE_REASON"/>
<result property="leaveRemark" column="LEAVE_REMARK"/> <result property="leaveRemark" column="LEAVE_REMARK"/>
<result property="contactAddress" column="CONTACT_ADDRESS"/> <result property="contactAddress" column="CONTACT_ADDRESS"/>
</resultMap> </resultMap>
<resultMap id="tEmployeeExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO">
<result property="empCode" column="EMP_CODE"/>
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="validityStart" column="VALIDITY_START"/>
<result property="validityEnd" column="VALIDITY_END"/>
<result property="empMarriStatus" column="EMP_MARRI_STATUS"/>
<result property="empNational" column="EMP_NATIONAL"/>
<result property="politicalStatus" column="POLITICAL_STATUS"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="empEmail" column="EMP_EMAIL"/>
<result property="idProvince" column="ID_PROVINCE"/>
<result property="idCity" column="ID_CITY"/>
<result property="idTown" column="ID_TOWN"/>
<result property="empRegisType" column="EMP_REGIS_TYPE"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="isCollege" column="IS_COLLEGE"/>
<result property="hignEducation" column="HIGN_EDUCATION"/>
<result property="school" column="SCHOOL"/>
<result property="major" column="MAJOR"/>
<result property="admissionDate" column="ADMISSION_DATE"/>
<result property="gradutionDate" column="GRADUTION_DATE"/>
<result property="remark" column="REMARK"/>
<result property="fileSource" column="FILE_SOURCE"/>
<result property="isProjects" column="IS_PROJECTS"/>
<result property="projectNum" column="PROJECT_NUM"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
<result property="insuranceStatus" column="INSURANCE_STATUS"/>
<result property="socialStatus" column="SOCIAL_STATUS"/>
<result property="fundStatus" column="FUND_STATUS"/>
<result property="salaryStatus" column="SALARY_STATUS"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contactAddress" column="CONTACT_ADDRESS"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="leaveUserName" column="LEAVE_USER_NAME"/>
<result property="leaveTime" column="LEAVE_TIME"/>
<result property="leaveReason" column="LEAVE_REASON"/>
<result property="leaveRemark" column="LEAVE_REMARK"/>
</resultMap>
<sql id="baseParam"> <sql id="baseParam">
a.ID, a.ID,
a.EMP_CODE, a.EMP_CODE,
...@@ -121,12 +170,54 @@ ...@@ -121,12 +170,54 @@
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME, a.UPDATE_TIME,
a.LEAVE_USER, a.LEAVE_USER,
a.LEAVE_USER_NAME,
a.LEAVE_TIME, a.LEAVE_TIME,
a.LEAVE_REASON, a.LEAVE_REASON,
a.LEAVE_REMARK, a.LEAVE_REMARK,
a.CONTACT_ADDRESS a.CONTACT_ADDRESS
</sql> </sql>
<sql id="Base_Export_List">
a.EMP_CODE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.VALIDITY_START,
a.VALIDITY_END,
a.EMP_MARRI_STATUS,
a.EMP_NATIONAL,
a.POLITICAL_STATUS,
a.EMP_PHONE,
a.EMP_EMAIL,
a.ID_PROVINCE,
a.ID_CITY,
a.ID_TOWN,
a.EMP_REGIS_TYPE,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,
a.IS_COLLEGE,
a.HIGN_EDUCATION,
a.SCHOOL,
a.MAJOR,
a.ADMISSION_DATE,
a.GRADUTION_DATE,
a.REMARK,
a.FILE_SOURCE,
if(count(b.id)>1,'是','否') IS_PROJECTS,
a.PROJECT_NUM,
GROUP_CONCAT(b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(b.DEPT_NO) DEPT_NO,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
a.SALARY_STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTACT_ADDRESS
</sql>
<update id="updateEducationOfEmp"> <update id="updateEducationOfEmp">
update t_employee_info update t_employee_info
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
...@@ -142,6 +233,13 @@ ...@@ -142,6 +233,13 @@
<sql id="employeeInfo_where"> <sql id="employeeInfo_where">
<if test="tEmployeeInfo != null"> <if test="tEmployeeInfo != null">
<if test="tEmployeeInfo.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tEmployeeInfo.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.idList == null">
<if test="tEmployeeInfo.id != null and tEmployeeInfo.id.trim() != ''"> <if test="tEmployeeInfo.id != null and tEmployeeInfo.id.trim() != ''">
AND a.ID = #{tEmployeeInfo.id} AND a.ID = #{tEmployeeInfo.id}
</if> </if>
...@@ -149,7 +247,7 @@ ...@@ -149,7 +247,7 @@
AND a.EMP_CODE = #{tEmployeeInfo.empCode} AND a.EMP_CODE = #{tEmployeeInfo.empCode}
</if> </if>
<if test="tEmployeeInfo.empNatrue != null and tEmployeeInfo.empNatrue.trim() != ''"> <if test="tEmployeeInfo.empNatrue != null and tEmployeeInfo.empNatrue.trim() != ''">
AND a.EMP_NATRUE in in concat('(',${tEmployeeInfo.empNatrue},')') AND a.EMP_NATRUE in (${tEmployeeInfo.empNatrue})
</if> </if>
<if test="tEmployeeInfo.empName != null and tEmployeeInfo.empName.trim() != ''"> <if test="tEmployeeInfo.empName != null and tEmployeeInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeInfo.empName} AND a.EMP_NAME = #{tEmployeeInfo.empName}
...@@ -247,16 +345,16 @@ ...@@ -247,16 +345,16 @@
</if> </if>
</if> </if>
<if test="tEmployeeInfo.contractStatus != null"> <if test="tEmployeeInfo.contractStatus != null">
AND a.CONTRACT_STATUS in concat('(',${tEmployeeInfo.contractStatus},')') AND a.CONTRACT_STATUS in (${tEmployeeInfo.contractStatus})
</if> </if>
<if test="tEmployeeInfo.insuranceStatus != null"> <if test="tEmployeeInfo.insuranceStatus != null">
AND a.INSURANCE_STATUS in concat('(',${tEmployeeInfo.insuranceStatus},')') AND a.INSURANCE_STATUS in (${tEmployeeInfo.insuranceStatus})
</if> </if>
<if test="tEmployeeInfo.socialStatus != null"> <if test="tEmployeeInfo.socialStatus != null">
AND a.SOCIAL_STATUS in concat('(',${tEmployeeInfo.socialStatus},')') AND a.SOCIAL_STATUS in (${tEmployeeInfo.socialStatus})
</if> </if>
<if test="tEmployeeInfo.fundStatus != null"> <if test="tEmployeeInfo.fundStatus != null">
AND a.FUND_STATUS in concat('(',${tEmployeeInfo.fundStatus},')') AND a.FUND_STATUS in (${tEmployeeInfo.fundStatus})
</if> </if>
<if test="tEmployeeInfo.salaryStatus != null"> <if test="tEmployeeInfo.salaryStatus != null">
AND a.SALARY_STATUS = #{tEmployeeInfo.salaryStatus} AND a.SALARY_STATUS = #{tEmployeeInfo.salaryStatus}
...@@ -282,6 +380,9 @@ ...@@ -282,6 +380,9 @@
<if test="tEmployeeInfo.leaveUser != null and tEmployeeInfo.leaveUser.trim() != ''"> <if test="tEmployeeInfo.leaveUser != null and tEmployeeInfo.leaveUser.trim() != ''">
AND a.LEAVE_USER = #{tEmployeeInfo.leaveUser} AND a.LEAVE_USER = #{tEmployeeInfo.leaveUser}
</if> </if>
<if test="tEmployeeInfo.leaveUserName != null and tEmployeeInfo.leaveUserName.trim() != ''">
AND a.LEAVE_USER_NAME = #{tEmployeeInfo.leaveUserName}
</if>
<if test="tEmployeeInfo.leaveTime != null"> <if test="tEmployeeInfo.leaveTime != null">
AND a.LEAVE_TIME = #{tEmployeeInfo.leaveTime} AND a.LEAVE_TIME = #{tEmployeeInfo.leaveTime}
</if> </if>
...@@ -294,6 +395,16 @@ ...@@ -294,6 +395,16 @@
<if test="tEmployeeInfo.contactAddress != null and tEmployeeInfo.contactAddress.trim() != ''"> <if test="tEmployeeInfo.contactAddress != null and tEmployeeInfo.contactAddress.trim() != ''">
AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress} AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress}
</if> </if>
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
AND b.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
<if test="tEmployeeInfo.deptName != null and tEmployeeInfo.deptName.trim() != ''">
AND b.DEPT_NAME like concat('%',#{tEmployeeInfo.deptName},'%')
</if>
<if test="tEmployeeInfo.deptNo != null and tEmployeeInfo.deptNo.trim() != ''">
AND b.DEPT_NO = #{tEmployeeInfo.deptNo}
</if>
</if>
</if> </if>
</sql> </sql>
...@@ -302,7 +413,8 @@ ...@@ -302,7 +413,8 @@
select select
<include refid="baseParam"/> <include refid="baseParam"/>
from t_employee_info a from t_employee_info a
where 1=1 left join t_employee_project b on a.id = b.EMP_ID
where a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/> <include refid="employeeInfo_where"/>
${sql} ${sql}
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
...@@ -313,7 +425,8 @@ ...@@ -313,7 +425,8 @@
select select
<include refid="baseParam"/> <include refid="baseParam"/>
from t_employee_info a from t_employee_info a
where 1=1 left join t_employee_project b on a.id = b.EMP_ID
where a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/> <include refid="employeeInfo_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
...@@ -410,4 +523,34 @@ ...@@ -410,4 +523,34 @@
) )
</foreach> </foreach>
</insert> </insert>
<!--tEmployeeInfo人员档案导出查询-->
<select id="getTEmployeeExportList" resultMap="tEmployeeExportMap">
select
<include refid="Base_Export_List"/>
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
</where>
</select>
<!--tEmployeeInfo离职档案导出查询-->
<select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap">
SELECT
<include refid="Base_Export_List"/>
,GROUP_CONCAT(b.unit_name) UNIT_NAME
,GROUP_CONCAT(b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
</where>
</select>
</mapper> </mapper>
...@@ -623,7 +623,7 @@ ...@@ -623,7 +623,7 @@
FROM FROM
t_employee_project t_employee_project
WHERE WHERE
DELETE_FLAG = 0 DELETE_FLAG = '0'
and id not like '%abc' and id not like '%abc'
and and
EMP_NO LIKE CONCAT( EMP_NO LIKE CONCAT(
...@@ -658,7 +658,7 @@ ...@@ -658,7 +658,7 @@
FROM t_employee_project a FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id left join t_employee_info b on a.EMP_ID = b.id
<where> <where>
1=1 AND a.DELETE_FLAG = 0 a.DELETE_FLAG = '0'
<include refid="tEmployeeProject_where"/> <include refid="tEmployeeProject_where"/>
</where> </where>
</select> </select>
...@@ -669,7 +669,7 @@ ...@@ -669,7 +669,7 @@
FROM t_employee_project a FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id left join t_employee_info b on a.EMP_ID = b.id
<where> <where>
1=1 AND a.DELETE_FLAG = 0 a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/> <include refid="exportTEmployeeProject_where"/>
</where> </where>
</select> </select>
......
...@@ -235,6 +235,13 @@ public interface CommonConstants { ...@@ -235,6 +235,13 @@ public interface CommonConstants {
String PARAM_IS_NOT_EMPTY = "参数不可为空"; String PARAM_IS_NOT_EMPTY = "参数不可为空";
String DATA_CAN_NOT_EMPTY = "数据不可为空";
String PLEASE_LOG_IN = "请登录!";
String SEX_MAN = "1";
String SEX_WONMAN = "2";
// 是否 // 是否
String IS_FALSE = "否"; String IS_FALSE = "否";
String IS_TRUE = "是"; String IS_TRUE = "是";
......
...@@ -253,6 +253,10 @@ public interface ErrorCodes { ...@@ -253,6 +253,10 @@ public interface ErrorCodes {
String ARCHIVES_IMPORT_EMP_HIGH_EDUCATION_ERROR = "archives.import.emp.high.education.error"; String ARCHIVES_IMPORT_EMP_HIGH_EDUCATION_ERROR = "archives.import.emp.high.education.error";
// 根据身份证未找到人员档案信息 // 根据身份证未找到人员档案信息
String ARCHIVES_IMPORT_EMP_NOT_EXISTS = "archives.import.emp.not.exists"; String ARCHIVES_IMPORT_EMP_NOT_EXISTS = "archives.import.emp.not.exists";
// 身份证必填
String ARCHIVES_IMPORT_EMP_IDCARD_MUST = "archives.import.emp.idCard.must";
// 减档原因必填
String ARCHIVES_IMPORT_EMP_LEAVEREASON_MUST = "archives.import.emp.leaveReason.must";
/** /**
* 项目档案状态为已审核,禁止删除 * 项目档案状态为已审核,禁止删除
......
...@@ -52,6 +52,10 @@ public class DateUtil { ...@@ -52,6 +52,10 @@ public class DateUtil {
*/ */
public static final String DATETIME_YYYYMM = "yyyyMM"; public static final String DATETIME_YYYYMM = "yyyyMM";
/** /**
* yyyy
*/
public static final String DATETIME_YYYY = "yyyy";
/**
* yyyy-MM * yyyy-MM
*/ */
public static final String DATETIME_YYYY_MM = "yyyy-MM"; public static final String DATETIME_YYYY_MM = "yyyy-MM";
...@@ -1342,7 +1346,6 @@ public class DateUtil { ...@@ -1342,7 +1346,6 @@ public class DateUtil {
* @Date: 2020/12/21 * @Date: 2020/12/21
* @Description: 获取这个月 * @Description: 获取这个月
* @return: java.lang.String * @return: java.lang.String
* @see com.yifu.cloud.v1.common.core.util
**/ **/
public static String getThisMonth(){ public static String getThisMonth(){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.DATETIME_YYYYMM); SimpleDateFormat sf = new SimpleDateFormat(DateUtil.DATETIME_YYYYMM);
...@@ -1351,6 +1354,20 @@ public class DateUtil { ...@@ -1351,6 +1354,20 @@ public class DateUtil {
return thisMonth; return thisMonth;
} }
/**
* @param years 出生年
* @Description: 获取年龄
* @Author: hgw
* @Date: 2022/6/24 16:49
* @return: int
**/
public static int getAge(int years){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.DATETIME_YYYY);
Date nowDate = new Date();
int thisYear = Integer.parseInt(sf.format(nowDate));
return thisYear - years + 1;
}
/** /**
* @Description: 返回当前年月日字符串 * @Description: 返回当前年月日字符串
* @Author: hgw * @Author: hgw
...@@ -1362,6 +1379,17 @@ public class DateUtil { ...@@ -1362,6 +1379,17 @@ public class DateUtil {
return sf.format(new Date()); return sf.format(new Date());
} }
/**
* @Description: 返回当前年月日时分秒字符串(一般用在导出文件名)
* @Author: hgw
* @Date: 2022-6-24 10:00:41
* @return: java.lang.String
**/
public static String getThisTime(){
SimpleDateFormat sf = new SimpleDateFormat(DateUtil.DATE_PATTERN);
return sf.format(new Date());
}
/** /**
* @param * @param
......
...@@ -79,6 +79,8 @@ archives.import.emp.area.error=\u6237\u7C4D\u6240\u5728\u5730\u672A\u627E\u5230\ ...@@ -79,6 +79,8 @@ archives.import.emp.area.error=\u6237\u7C4D\u6240\u5728\u5730\u672A\u627E\u5230\
archives.import.emp.file.area.error=\u6863\u6848\u6240\u5728\u5730\u672A\u627E\u5230\u533A\u57DF archives.import.emp.file.area.error=\u6863\u6848\u6240\u5728\u5730\u672A\u627E\u5230\u533A\u57DF
archives.import.emp.high.education.error=\u5927\u4E13\u53CA\u4EE5\u4E0A\uFF0C\u6700\u9AD8\u5B66\u5386\u5FC5\u586B archives.import.emp.high.education.error=\u5927\u4E13\u53CA\u4EE5\u4E0A\uFF0C\u6700\u9AD8\u5B66\u5386\u5FC5\u586B
archives.import.emp.not.exists=\u6839\u636E\u8EAB\u4EFD\u8BC1\u672A\u627E\u5230\u4EBA\u5458\u6863\u6848\u4FE1\u606F archives.import.emp.not.exists=\u6839\u636E\u8EAB\u4EFD\u8BC1\u672A\u627E\u5230\u4EBA\u5458\u6863\u6848\u4FE1\u606F
archives.import.emp.idCard.must=\u8EAB\u4EFD\u8BC1\u5FC5\u586B
archives.import.emp.leaveReason.must=\u51CF\u6863\u539F\u56E0\u5FC5\u586B
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment