archive file
parent
a70e1200ec
commit
2d8ee3a802
|
|
@ -439,32 +439,44 @@ public class OrgPersonnelExcelImporter {
|
|||
String userName = trim(basic.getUserName());
|
||||
Integer rowIndex = capability.getRowIndex();
|
||||
|
||||
// 能力认证一(必填):认证行业、专业能力、来源,查询不到枚举即记录异常并返回
|
||||
// 能力认证一(可空,但认证行业/专业能力/来源为一组):必须整组全空或整组全填,仅部分填写视为异常
|
||||
String cert1Industry = trim(capability.getCert1Industry());
|
||||
IndustryEnum cert1IndustryEnum = IndustryEnum.ofName(cert1Industry);
|
||||
if (cert1IndustryEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-认证行业[" + cert1Industry + "]无法识别"));
|
||||
return false;
|
||||
}
|
||||
|
||||
String cert1Ability = trim(capability.getCert1Ability());
|
||||
ProfessionalCapabilityEnum cert1AbilityEnum = ProfessionalCapabilityEnum.ofName(cert1Ability);
|
||||
if (cert1AbilityEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-专业能力[" + cert1Ability + "]无法识别"));
|
||||
return false;
|
||||
}
|
||||
|
||||
String cert1Source = trim(capability.getCert1Source());
|
||||
ProfessionalCapabilitySourceEnum cert1SourceEnum = ProfessionalCapabilitySourceEnum.ofName(cert1Source);
|
||||
if (cert1SourceEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-来源[" + cert1Source + "]无法识别"));
|
||||
return false;
|
||||
boolean cert1IndustryHasText = StringUtils.hasText(cert1Industry);
|
||||
boolean cert1AbilityHasText = StringUtils.hasText(cert1Ability);
|
||||
boolean cert1SourceHasText = StringUtils.hasText(cert1Source);
|
||||
if (cert1IndustryHasText || cert1AbilityHasText || cert1SourceHasText) {
|
||||
if (!cert1IndustryHasText || !cert1AbilityHasText || !cert1SourceHasText) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一的认证行业、专业能力、来源必须同时填写"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// 能力认证一(必填):认证行业、专业能力、来源,查询不到枚举即记录异常并返回
|
||||
IndustryEnum cert1IndustryEnum = IndustryEnum.ofName(cert1Industry);
|
||||
if (cert1IndustryEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-认证行业[" + cert1Industry + "]无法识别"));
|
||||
return false;
|
||||
}
|
||||
|
||||
ProfessionalCapabilityEnum cert1AbilityEnum = ProfessionalCapabilityEnum.ofName(cert1Ability);
|
||||
if (cert1AbilityEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-专业能力[" + cert1Ability + "]无法识别"));
|
||||
return false;
|
||||
}
|
||||
|
||||
ProfessionalCapabilitySourceEnum cert1SourceEnum = ProfessionalCapabilitySourceEnum.ofName(cert1Source);
|
||||
if (cert1SourceEnum == null) {
|
||||
errors.add(new OrgPersonnelImportErrorCO(rowIndex, account, userName,
|
||||
"能力认证一-来源[" + cert1Source + "]无法识别"));
|
||||
return false;
|
||||
}
|
||||
// 有能力认证(三项枚举齐全)-> 组装能力认定回填到基础信息行
|
||||
appendCapabilityAssessment(basic, cert1IndustryEnum, cert1AbilityEnum, cert1SourceEnum);
|
||||
}
|
||||
// 有能力认证(三项枚举齐全)-> 组装能力认定回填到基础信息行
|
||||
appendCapabilityAssessment(basic, cert1IndustryEnum, cert1AbilityEnum, cert1SourceEnum);
|
||||
|
||||
|
||||
// 能力认证二(可空,但认证行业/专业能力/来源为一组):必须整组全空或整组全填,仅部分填写视为异常
|
||||
|
|
|
|||
|
|
@ -227,17 +227,14 @@ public class OrgPersonnelImportRow {
|
|||
private String idCardNo;
|
||||
|
||||
@ExcelProperty(value = "能力认证一-认证行业", index = 2)
|
||||
@NotBlank(message = "能力认证一-认证行业不能为空")
|
||||
@Size(max = 64, message = "能力认证一-认证行业最多64个字符")
|
||||
private String cert1Industry;
|
||||
|
||||
@ExcelProperty(value = "能力认证一-专业能力", index = 3)
|
||||
@NotBlank(message = "能力认证一-专业能力不能为空")
|
||||
@Size(max = 64, message = "能力认证一-专业能力最多64个字符")
|
||||
private String cert1Ability;
|
||||
|
||||
@ExcelProperty(value = "能力认证一-来源", index = 4)
|
||||
@NotBlank(message = "能力认证一-来源不能为空")
|
||||
@Size(max = 128, message = "能力认证一-来源最多64个字符")
|
||||
private String cert1Source;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ import lombok.RequiredArgsConstructor;
|
|||
@RequiredArgsConstructor
|
||||
public enum ProfessionalCapabilitySourceEnum {
|
||||
|
||||
REGISTERED_SAFETY_ENGINEER("REGISTERED_SAFETY_ENGINEER", "注册安全工程师"),
|
||||
EDUCATION("EDUCATION", "学历"),
|
||||
PROFESSIONAL_TITLE("PROFESSIONAL_TITLE", "职称"),
|
||||
REGISTERED_SAFETY_ENGINEER("REGISTERED_SAFETY_ENGINEER", "注册安全工程师证书"),
|
||||
EDUCATION("EDUCATION", "毕业证书"),
|
||||
PROFESSIONAL_TITLE("PROFESSIONAL_TITLE", "职称证书"),
|
||||
ACADEMIC_ACHIEVEMENT("ACADEMIC_ACHIEVEMENT", "出版学术专著、专利、获奖、发表学术论文等"),
|
||||
;
|
||||
|
||||
private final String value;
|
||||
private final String label;
|
||||
|
||||
public static final String REMARKS = "专业能力来源: REGISTERED_SAFETY_ENGINEER=>注册安全工程师;" +
|
||||
"EDUCATION=>学历;" +
|
||||
"PROFESSIONAL_TITLE=>职称;" +
|
||||
public static final String REMARKS = "专业能力来源: REGISTERED_SAFETY_ENGINEER=>注册安全工程师证书;" +
|
||||
"EDUCATION=>毕业证书;" +
|
||||
"PROFESSIONAL_TITLE=>职称证书;" +
|
||||
"ACADEMIC_ACHIEVEMENT=>出版学术专著、专利、获奖、发表学术论文等";
|
||||
|
||||
public static ProfessionalCapabilitySourceEnum ofName(String name) {
|
||||
|
|
|
|||
|
|
@ -83,6 +83,6 @@ auth:
|
|||
template:
|
||||
personnel:
|
||||
import:
|
||||
url: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/27/246373e518c645ff8fabf39fd3311f4c.xlsx
|
||||
url: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/27/3f5e3858c8f948818d16c42bb632dd1f.xlsx
|
||||
paper:
|
||||
importUrl: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/18/d187b58e19ac480cb38187f7d7557ddb.xlsx
|
||||
|
|
@ -84,6 +84,6 @@ auth:
|
|||
template:
|
||||
personnel:
|
||||
import:
|
||||
url: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/27/246373e518c645ff8fabf39fd3311f4c.xlsx
|
||||
url: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/27/3f5e3858c8f948818d16c42bb632dd1f.xlsx
|
||||
paper:
|
||||
importUrl: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/8/18/d187b58e19ac480cb38187f7d7557ddb.xlsx
|
||||
Loading…
Reference in New Issue