67243 文档库-导入-分阶段实施详情增加必填校验
This commit is contained in:
+42
-17
@@ -5269,10 +5269,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
//
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String tree = "分阶段实施详情字段,多行之间使用#号分隔,列之间使用<p>标签分隔,示例:法规编号/条款<p>新车型<p>2000-10-10<p>备注#";
|
||||
String tree = "分阶段实施详情字段,多行之间使用#号分隔,列之间使用<n>标签分隔,示例:法规编号/条款<n>新车型<n>2000-10-10<n>备注#";
|
||||
sbTwo.append(count++ + "." + tree);
|
||||
}else{
|
||||
String tree = "For the field of phased implementation details, separate rows with # signs and columns with <p> labels. Example: Regulation Number/Articles <p> New model <p>2000-10-10<p> Remarks";
|
||||
String tree = "For the field of phased implementation details, separate rows with # signs and columns with <n> labels. Example: Regulation Number/Articles <n> New model <n>2000-10-10<n> Remarks";
|
||||
sbTwo.append(count++ + "." + tree);
|
||||
}
|
||||
List<String> list = new LinkedList<>();
|
||||
@@ -5960,14 +5960,21 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> phasedImplDetailsList = Arrays.asList(value.split("#"));
|
||||
for (String phasedImplDetails : phasedImplDetailsList) {
|
||||
PhasedImplementationDetailsEO phasedImplementationDetailsEO = new PhasedImplementationDetailsEO();
|
||||
String[] phasedImplDetailsArr = phasedImplDetails.split("<p>");
|
||||
String[] phasedImplDetailsArr = phasedImplDetails.split("<n>");
|
||||
if(phasedImplDetailsArr.length >= 1){
|
||||
String standNumberOrClause = phasedImplDetailsArr[0];
|
||||
if (StringUtils.isNotBlank(standNumberOrClause) && standNumberOrClause.length() > 200) {
|
||||
if(StringUtils.isEmpty(standNumberOrClause)){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-法规编号/条款不能为空, ";
|
||||
}else{
|
||||
errorMsg += "Phased Implementation Details - Regulation No./clause cannot be empty,";
|
||||
}
|
||||
countError++;
|
||||
} else if (StringUtils.isNotBlank(standNumberOrClause) && standNumberOrClause.length() > 200) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-法规编号/条款不能超过" + 200 + "个字符, ";
|
||||
}else{
|
||||
errorMsg += "Details of the phased implementation standNumberOrClause Can not be more than " + 200 + " char, ";
|
||||
errorMsg += "Phased Implementation Details - Regulation No./clause Can not be more than " + 200 + " char, ";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
@@ -5976,6 +5983,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
if(phasedImplDetailsArr.length >= 2){
|
||||
String implementationTypeName = phasedImplDetailsArr[1];
|
||||
|
||||
if(StringUtils.isNotEmpty(implementationTypeName)){
|
||||
String[] implementationTypeNameArr = implementationTypeName.split(",");
|
||||
ImplementationTypeEnum[] implementationTypeEnums = ImplementationTypeEnum.values();
|
||||
@@ -5993,30 +6001,47 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-实施类型填写有误,填写值为'新车型 或 在产车', ";
|
||||
}else{
|
||||
errorMsg += "Details of the phased implementation implementationType The value is set to 'New car model or Car in production', ";
|
||||
errorMsg += "Phased Implementation Details - implementationType The value is set to 'New car model or Car in production', ";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
phasedImplementationDetailsEO.setImplementationType(implementationTypeList.stream().collect(Collectors.joining(",")));
|
||||
}
|
||||
}else {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-实施类型不能为空, ";
|
||||
}else{
|
||||
errorMsg += "Phased Implementation Details - Implementation Type cannot be empty,";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
if(phasedImplDetailsArr.length >= 3){
|
||||
Date implementationDate = null;
|
||||
try {
|
||||
implementationDate = DateUtils.parseDate(phasedImplDetailsArr[2], "yyyy-MM-dd");
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(implementationDate == null){
|
||||
String implementationDateStr = phasedImplDetailsArr[2];
|
||||
if(StringUtils.isEmpty(implementationDateStr)){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-实施日期格式错误,正确格式为'yyyy-MM-dd', ";
|
||||
errorMsg += "分阶段实施详情-实施日期不能为空, ";
|
||||
}else{
|
||||
errorMsg += "Details of the phased implementation implementationDate format is incorrect. The correct format is 'yyyy-MM-dd', ";
|
||||
errorMsg += "Phased Implementation Details - Implementation Date cannot be empty,";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
phasedImplementationDetailsEO.setImplementationDate(implementationDate);
|
||||
Date implementationDate = null;
|
||||
try {
|
||||
implementationDate = DateUtils.parseDate(phasedImplDetailsArr[2], "yyyy-MM-dd");
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(implementationDate == null){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-实施日期格式错误,正确格式为'yyyy-MM-dd', ";
|
||||
}else{
|
||||
errorMsg += "Phased Implementation Details - implementationDate format is incorrect. The correct format is 'yyyy-MM-dd', ";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
phasedImplementationDetailsEO.setImplementationDate(implementationDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(phasedImplDetailsArr.length >= 4){
|
||||
@@ -6025,7 +6050,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += "分阶段实施详情-备注不能超过" + 1000 + "个字符, ";
|
||||
}else{
|
||||
errorMsg += "Details of the phased implementation ramarks Can not be more than " + 1000 + " char, ";
|
||||
errorMsg += "Phased Implementation Details - ramarks Can not be more than " + 1000 + " char, ";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user