From 715727fbae0fdbd735e1f340605cd8ed46e33b21 Mon Sep 17 00:00:00 2001 From: liyawei Date: Thu, 23 Jun 2022 10:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF-=E8=8B=B1=E6=96=87=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cert/template/enums/ControlTypeEnum.java | 20 +++--- .../template/enums/ControlVerifyEnum.java | 18 +++--- .../cert/template/enums/ParamsIsMustEnum.java | 4 +- .../service/impl/ParamsInfoEOServiceImpl.java | 64 +++++++++++-------- .../cert/template/vo/ParamsInfoEnExport.java | 4 +- 5 files changed, 61 insertions(+), 49 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java index 1c0f1bfb4..3beeb783d 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java @@ -11,16 +11,16 @@ import java.util.Map; * @Date: Created in 15:51 2022/4/22 */ public enum ControlTypeEnum { - TEXT("文本", "text","1"), - PULL_SINGLE("下拉单选","pull single","2"), - PULL_MORE("下拉多选","pull more","3"), - FILE("附件","file","4"), - TEXT_PULL_SINGLE("文本+下拉单选","text+pull single","5"), - TEXT_PULL_MORE("文本+下拉多选","text+pull more","6"), - TEXT_FILE("文本+附件","text+file","7"), - PULL_SINGLE_FILE("下拉单选+附件","pull single+file","8"), - PULL_MORE_FILE("下拉多选+附件","pull more+file","9"), - TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","text+pull single file","10"); + TEXT("文本", "Text","1"), + PULL_SINGLE("下拉单选","Pull single","2"), + PULL_MORE("下拉多选","Pull more","3"), + FILE("附件","File","4"), + TEXT_PULL_SINGLE("文本+下拉单选","Text+Pull single","5"), + TEXT_PULL_MORE("文本+下拉多选","Text+Pull more","6"), + TEXT_FILE("文本+附件","Text+File","7"), + PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"), + PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"), + TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"); String name; String enName; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlVerifyEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlVerifyEnum.java index 0234d1fa8..b8b399e51 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlVerifyEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlVerifyEnum.java @@ -11,15 +11,15 @@ import java.util.Map; * @Date: Created in 15:58 2022/4/22 */ public enum ControlVerifyEnum { - NULL("无","null","1"), - CHINESE("中文","chinese","2"), - POSITIVE_INTEGER("正整数","positive integer","3"), - POSITIVE_FLOAT("正浮点数","positive float","4"), - INTEGER_DECIMAL("整数或小数","integer decimal","5"), - DECIMAL_ONE("一位小数","decimal one","6"), - DECIMAL_TWO("两位小数","decimal two","7"), - DECIMAL_THREE("三位小数","decimal three","8"), - DECIMAL_FOUR("四位小数","decimal four","9"); + NULL("无","Null","1"), + CHINESE("中文","Chinese","2"), + POSITIVE_INTEGER("正整数","Positive integer","3"), + POSITIVE_FLOAT("正浮点数","Positive float","4"), + INTEGER_DECIMAL("整数或小数","Integer decimal","5"), + DECIMAL_ONE("一位小数","Decimal one","6"), + DECIMAL_TWO("两位小数","Decimal two","7"), + DECIMAL_THREE("三位小数","Decimal three","8"), + DECIMAL_FOUR("四位小数","Decimal four","9"); String name; String enName; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ParamsIsMustEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ParamsIsMustEnum.java index 27e4cc10a..5c8ea1caf 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ParamsIsMustEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ParamsIsMustEnum.java @@ -11,8 +11,8 @@ import java.util.Map; * @Date: Created in 11:20 2022/4/14 */ public enum ParamsIsMustEnum { - YES("是","yes","1"), - NO("否","no","0"); + YES("是","Yes","1"), + NO("否","No","0"); String name; String enName; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java index f8623f09c..4f06abf50 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java @@ -1072,24 +1072,28 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl resultMap = new HashMap<>(); // nio编号 String nioNumber = dto.getNioNumber(); - resultMap = validateMustAndLength(nioNumber, "nio编号", "nio number", IsMustEnum.YES.getValue(),"15", false, cut); + resultMap = validateMustAndLength(nioNumber, "NIO编号", "NIO Number", IsMustEnum.YES.getValue(),"15", false, cut); errorMsg += (String)resultMap.get("errorMsg"); countError += (int)resultMap.get("countError"); if (StringUtils.isNotEmpty(dto.getNioNumber())) { // 校验nio编号 格式:字母数字横杠(-) String nioNumberRegex = "^[A-Za-z0-9-]+$"; if (!nioNumber.matches(nioNumberRegex)) { - errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-)"; + if(CutEnum.CN.getValue().equals(cut)) { + errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-);"; + } else { + errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-);"; + } countError++; } } // 是否必填 String isMust = dto.getIsMust(); - resultMap = validateMustAndLength(isMust, "是否必填", "is must", IsMustEnum.YES.getValue(), "50", false, cut); + resultMap = validateMustAndLength(isMust, "是否必填", "Is Must", IsMustEnum.YES.getValue(), "50", false, cut); errorMsg += (String)resultMap.get("errorMsg"); countError += (int)resultMap.get("countError"); - resultMap = getCodeByName(isMust,"是否必填","is must","enum",paramsIsMustEnumMap,null,null,cut); + resultMap = getCodeByName(isMust,"是否必填","Is Must","enum",paramsIsMustEnumMap,null,null,cut); errorMsg += (String)resultMap.get("errorMsg"); countError += (int)resultMap.get("countError"); isMust = (String)resultMap.get("value"); @@ -1097,16 +1101,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl resultMap = new HashMap<>(); @@ -1280,23 +1284,27 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new)); if (ccDtoAfterDistinct.size() < certCategoryParamsInfoEOList.size()) { - stringMessage.add("导入数据中存在重复认证编号;"); + if(CutEnum.CN.getValue().equals(cut)) { + stringMessage.add("导入数据中存在重复认证编号;"); + } else { + stringMessage.add("Repeat number exist in the Import Data;"); + } } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/vo/ParamsInfoEnExport.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/vo/ParamsInfoEnExport.java index b5dd68d1d..e4e9b0339 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/vo/ParamsInfoEnExport.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/vo/ParamsInfoEnExport.java @@ -89,12 +89,12 @@ public class ParamsInfoEnExport { private String certCategory; /**控件类型*/ - @Excel(name = "*Control Type", width = 15, replace = {"text_1","pull single_2","pull more_3","file_4","text+pull single_5","text+pull more_6","text+file_7","pull single+file_8","pull more+file_9","text+pull single+file_10"}) + @Excel(name = "*Control Type", width = 15, replace = {"Text_1","Pull single_2","Pull more_3","File_4","Text+Pull single_5","Text+Pull more_6","Text+File_7","Pull single+File_8","Pull more+File_9","Text+Pull single+File_10"}) @ApiModelProperty(value = "控件类型") private String controlType; /**控件校验*/ - @Excel(name = "Control Verify", width = 15, replace = {"null_1","chinese_2","positive integer_3","positive float_4","integer decimaL_5","decimal one_6","decimal two_7","decimal three_8","decimal four_9"}) + @Excel(name = "Control Verify", width = 15, replace = {"Null_1","Chinese_2","Positive integer_3","Positive float_4","Integer decimal_5","Decimal one_6","Decimal two_7","Decimal three_8","Decimal four_9"}) @ApiModelProperty(value = "控件校验") private String controlVerify;