mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
政治面貌导入
This commit is contained in:
@@ -50,7 +50,7 @@ import java.util.stream.Collectors;
|
||||
public class EmployeeService extends BaseService<EmployeeEntity, EmployeeRepository> {
|
||||
public static final List<String> HEADERS =
|
||||
List.of(
|
||||
"姓名", "性别", "民族", "婚姻状况", "入职时间", "身份证号", "学历", "毕业学校", "籍贯", "住址", "手机号", "部门",
|
||||
"姓名", "性别", "民族","政治面貌", "婚姻状况", "入职时间", "身份证号", "学历", "毕业学校", "籍贯", "住址", "手机号", "部门",
|
||||
"岗位", "银行卡号", "收款人姓名");
|
||||
@Autowired private EmployeeRepository repository;
|
||||
|
||||
@@ -156,6 +156,10 @@ public class EmployeeService extends BaseService<EmployeeEntity, EmployeeReposit
|
||||
new ExcelUtils.ValidationInfo.ListValidationInfo(
|
||||
dictionaryService.getExcelValidation(
|
||||
"sex"));
|
||||
case "政治面貌" ->
|
||||
new ExcelUtils.ValidationInfo.ListValidationInfo(
|
||||
dictionaryService.getExcelValidation(
|
||||
"emp.politicalStatus"));
|
||||
case "民族" ->
|
||||
new ExcelUtils.ValidationInfo.ListValidationInfo(
|
||||
dictionaryService.getExcelValidation(
|
||||
@@ -217,6 +221,7 @@ public class EmployeeService extends BaseService<EmployeeEntity, EmployeeReposit
|
||||
var nationTranslator = translator.apply("nation");
|
||||
var marriageTranslator = translator.apply("marriage");
|
||||
var educationTranslator = translator.apply("education");
|
||||
var politicalStatusTranslator = translator.apply("emp.politicalStatus");
|
||||
|
||||
List<EmployeeEntity> list =
|
||||
ExcelUtils.readFirstSheetToObjectList(
|
||||
@@ -228,6 +233,8 @@ public class EmployeeService extends BaseService<EmployeeEntity, EmployeeReposit
|
||||
case "性别" -> emp.setSex(ExcelUtils.getCode(value, sexTranslator));
|
||||
case "民族" ->
|
||||
emp.setNation(ExcelUtils.getCode(value, nationTranslator));
|
||||
case "政治面貌" ->
|
||||
emp.setNation(ExcelUtils.getCode(value, politicalStatusTranslator));
|
||||
case "婚姻状况" ->
|
||||
emp.setMarriage(
|
||||
ExcelUtils.getCode(value, marriageTranslator));
|
||||
|
||||
Reference in New Issue
Block a user