feat: 年度制修订导入 标准等级分类1级和3级取消自动清空
This commit is contained in:
-4
@@ -539,10 +539,6 @@ public class ProcessEsAnnualInitServiceImpl extends ServiceImpl<ProcessEsAnnualI
|
||||
} else {
|
||||
item.setChangeStatus(ESPChangeType.CHANGE.getValue());
|
||||
}
|
||||
// 如果标准等级分类是0级或3级,则需要将授权部门置空
|
||||
if (item.getEnStandardClassification().equals("1") || item.getEnStandardClassification().equals("4")) {
|
||||
item.setAuthDept(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
-4
@@ -419,10 +419,6 @@ public class ProcessEsAnnualReportServiceImpl extends ServiceImpl<ProcessEsAnnua
|
||||
} else {
|
||||
item.setChangeStatus(ESPChangeType.CHANGE.getValue());
|
||||
}
|
||||
// 如果标准等级分类是0级或3级,则需要将授权部门置空
|
||||
if (item.getEnStandardClassification().equals("1") || item.getEnStandardClassification().equals("4")) {
|
||||
item.setAuthDept(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -265,24 +265,22 @@ public class ExcelUtils {
|
||||
|
||||
// 检查授权部门
|
||||
if (!excelUtils.validDict("standard_grade_classify", standardClassification, null,
|
||||
null, true, listDict)) {
|
||||
null, true, listDict)) {
|
||||
return "'标准等级分类'无效。";
|
||||
}
|
||||
|
||||
String level = translateDictValue("standard_grade_classify", standardClassification, listDict);
|
||||
|
||||
if (StrUtil.isBlank(authDept)) {
|
||||
return "'授权部门'不能为空。";
|
||||
}
|
||||
// 检查授权部门
|
||||
if (!excelUtils.validDict("depart_name", authDept, "sys_depart", "id", false, listDict)) {
|
||||
return "'授权部门'无效。";
|
||||
}
|
||||
// 将授权部门转换为idList
|
||||
String deptIds = excelUtils.translateDictValue("depart_name", "id", "sys_depart", authDept, listDict);
|
||||
if (level.equals("2") || level.equals("3")) {
|
||||
if (StrUtil.isBlank(authDept)) {
|
||||
return "'授权部门'不能为空。";
|
||||
}
|
||||
|
||||
// 检查授权部门
|
||||
if (!excelUtils.validDict("depart_name", authDept, "sys_depart", "id", false, listDict)) {
|
||||
return "'授权部门'无效。";
|
||||
}
|
||||
|
||||
// 将授权部门转换为idList
|
||||
String deptIds = excelUtils.translateDictValue("depart_name", "id", "sys_depart", authDept, listDict);
|
||||
boolean isMatching = isMatchingAuthDept(
|
||||
Arrays.asList(deptIds.split(",")),
|
||||
level.equals("2") ? authDeptMap.get("1") : authDeptMap.get("2")
|
||||
@@ -418,7 +416,7 @@ public class ExcelUtils {
|
||||
|
||||
public String validPartName(String value, List<SysDictItemCore> listDict) {
|
||||
if (StrUtil.isBlank(value)) {
|
||||
return "零部件名称不能为空";
|
||||
return "零部件名称不能为空。";
|
||||
}
|
||||
// 检查工作组
|
||||
if (!excelUtils.validDict("part_name", value, null, null, true, listDict)) {
|
||||
@@ -440,7 +438,7 @@ public class ExcelUtils {
|
||||
|
||||
public String validStandardName(String value) {
|
||||
if (StrUtil.isBlank(value)) {
|
||||
return "新企标名称不能为空";
|
||||
return "'新企标名称不能为空'。";
|
||||
}
|
||||
if (value.length() > 50) {
|
||||
return "'新企标名称'过长(最多50字)。";
|
||||
|
||||
@@ -506,6 +506,9 @@ public class ImportUtil {
|
||||
}
|
||||
|
||||
public Date convertDate(String cellValue) {
|
||||
if (StrUtil.isBlank(cellValue)) {
|
||||
return null;
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 设置lenient为false,使得日期解析更为严格
|
||||
sdf.setLenient(false);
|
||||
|
||||
Reference in New Issue
Block a user