根据文件名读取文件工具-文件名格式修改
This commit is contained in:
+91
-43
@@ -181,6 +181,21 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
});
|
||||
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOList);
|
||||
}
|
||||
|
||||
// 处理附件模板 若附件模板被修改,修改文件表关联信息connect_id
|
||||
if (StringUtils.isNotBlank(paramsInfoEO.getFileTemplateConnectId())) {
|
||||
String fileId = paramsInfoEO.getFileTemplateConnectId();
|
||||
OSSFile targetOSSFile = ossFileService.getById(fileId);
|
||||
if (ObjectUtil.isNotEmpty(targetOSSFile)) { // 附件模板被修改,传的fileId
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileId);
|
||||
ossFile.setConnectId(connectId);
|
||||
ossFileService.updateById(ossFile);
|
||||
paramsInfoEO.setFileTemplateConnectId(connectId);
|
||||
}
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
paramsInfoEO.setUpdateTime(now);
|
||||
return updateById(paramsInfoEO);
|
||||
@@ -720,10 +735,14 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
ExcelImportResult<CertCategoryParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params);
|
||||
List<CertCategoryParamsInfoCnImport> list = result.getList();
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
list.forEach(certCategoryParamsInfoEO -> {
|
||||
for (CertCategoryParamsInfoCnImport certCategoryParamsInfoEO : list){
|
||||
//判断此行数据是否全部为空,是则不读取
|
||||
if (checkObjAllFieldsIsNull(certCategoryParamsInfoEO)) {
|
||||
continue;
|
||||
}
|
||||
certCategoryParamsInfoEO.setCertCategory(certCategoryMap.get(sheetName));
|
||||
certCategoryParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||
});
|
||||
}
|
||||
certCategoryParamsInfoEOListMap.put(sheetName, list);
|
||||
}
|
||||
}
|
||||
@@ -840,7 +859,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
certCategoryParamsInfoEOS.add(target);
|
||||
}
|
||||
|
||||
// 已存在的nio编号 进行覆盖 TODO 待测试
|
||||
// 已存在的nio编号 进行覆盖
|
||||
ParamsInfoVO paramsInfoVO = new ParamsInfoVO();
|
||||
paramsInfoVO.setParamsTemplateId(paramsTemplateId);
|
||||
List<ParamsInfoEO> oldParamsInfoEOList = paramsInfoEOMapper.selectListWithCert(paramsInfoVO);
|
||||
@@ -855,8 +874,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
// 删除原数据 参数项和认证类别参数项
|
||||
List<String> delParamsInfoEOIdList = delParamsInfoEOList.stream().map(ParamsInfoEO::getId).collect(Collectors.toList());
|
||||
List<String> delCertCategoryParamsInfoEOIdList = delCertCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getId).collect(Collectors.toList());
|
||||
deleteByIds(delParamsInfoEOIdList);
|
||||
certCategoryParamsInfoEOService.deleteByIds(delCertCategoryParamsInfoEOIdList);
|
||||
if (CollectionUtil.isNotEmpty(delParamsInfoEOIdList)) {
|
||||
deleteByIds(delParamsInfoEOIdList);
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(delCertCategoryParamsInfoEOIdList)) {
|
||||
certCategoryParamsInfoEOService.deleteByIds(delCertCategoryParamsInfoEOIdList);
|
||||
}
|
||||
|
||||
// 批量新增认证参数项
|
||||
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOS);
|
||||
@@ -938,7 +961,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// nio编号
|
||||
String nioNumber = dto.getNioNumber();
|
||||
resultMap = validateMustAndLength(nioNumber, "nio编号", 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())) {
|
||||
@@ -952,10 +975,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 是否必填
|
||||
String isMust = dto.getIsMust();
|
||||
resultMap = validateMustAndLength(isMust, "是否必填", 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,"是否必填","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");
|
||||
@@ -963,16 +986,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 参数名称
|
||||
String paramsName = dto.getParamsName();
|
||||
resultMap = validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(), "30", false, cut);
|
||||
resultMap = validateMustAndLength(paramsName, "参数名称", "params name", IsMustEnum.YES.getValue(), "30", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
// 技术领域
|
||||
String technologyTerritory = dto.getTechnologyTerritory();
|
||||
resultMap = validateMustAndLength(technologyTerritory, "技术领域", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||
resultMap = validateMustAndLength(technologyTerritory, "技术领域", "technology territory", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(technologyTerritory,"技术领域","treeDicCode",null,treeNameList,categoryList,cut);
|
||||
resultMap = getCodeByName(technologyTerritory,"技术领域", "technology territory","treeDicCode",null,treeNameList,categoryList,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
technologyTerritory = (String)resultMap.get("value");
|
||||
@@ -980,10 +1003,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 参数批次
|
||||
String paramsBatch = dto.getParamsBatch();
|
||||
resultMap = validateMustAndLength(paramsBatch, "参数批次", IsMustEnum.YES.getValue(), "50", true, cut);
|
||||
resultMap = validateMustAndLength(paramsBatch, "参数批次", "params batch", IsMustEnum.YES.getValue(), "50", true, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(paramsBatch,"参数批次","dicCode",null,itemNameList,dictItemList,cut);
|
||||
resultMap = getCodeByName(paramsBatch,"参数批次", "params batch", "dicCode",null,itemNameList,dictItemList,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
paramsBatch = (String)resultMap.get("value");
|
||||
@@ -991,10 +1014,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 责任领域
|
||||
String dutyTerritory = dto.getDutyTerritory();
|
||||
resultMap = validateMustAndLength(dutyTerritory, "责任领域", IsMustEnum.YES.getValue(), "50",true, cut);
|
||||
resultMap = validateMustAndLength(dutyTerritory, "责任领域", "duty territory", IsMustEnum.YES.getValue(), "50",true, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(dutyTerritory,"责任领域","dicCode",null,itemNameList,dictItemList,cut);
|
||||
resultMap = getCodeByName(dutyTerritory,"责任领域", "duty territory", "dicCode",null,itemNameList,dictItemList,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
dutyTerritory = (String)resultMap.get("value");
|
||||
@@ -1002,16 +1025,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 参数说明
|
||||
String description = dto.getDescription();
|
||||
resultMap = validateMustAndLength(description,"参数说明",IsMustEnum.NO.getValue(),"200",false,cut);
|
||||
resultMap = validateMustAndLength(description,"参数说明", "description", IsMustEnum.NO.getValue(),"200",false,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
// 认证类别
|
||||
String certCategory = dto.getCertCategory();
|
||||
resultMap = validateMustAndLength(certCategory, "认证类别", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||
resultMap = validateMustAndLength(certCategory, "认证类别", "cert category", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(certCategory,"认证类别","dicCode",null,itemNameList,dictItemList,cut);
|
||||
resultMap = getCodeByName(certCategory,"认证类别", "cert category", "dicCode",null,itemNameList,dictItemList,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
certCategory = (String)resultMap.get("value");
|
||||
@@ -1019,10 +1042,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 控件类型
|
||||
String controlType = dto.getControlType();
|
||||
resultMap = validateMustAndLength(controlType, "控件类型", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||
resultMap = validateMustAndLength(controlType, "控件类型", "control type", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlType,"控件类型","enum",controlTypeEnumMap,null,null,cut);
|
||||
resultMap = getCodeByName(controlType,"控件类型", "control type", "enum",controlTypeEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlType = (String)resultMap.get("value");
|
||||
@@ -1030,16 +1053,34 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 控件备选值
|
||||
String controlValues = dto.getControlValues();
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", IsMustEnum.NO.getValue(), "500",false, cut);
|
||||
if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "control values", IsMustEnum.YES.getValue(), "500", false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "control values", IsMustEnum.NO.getValue(), "500", false, cut);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
// 控件校验
|
||||
String controlVerify = dto.getControlVerify();
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", IsMustEnum.NO.getValue(), "50", false, cut);
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "control verify", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "control verify", IsMustEnum.NO.getValue(), "50", false, cut);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验","enum",controlVerifyEnumMap,null,null,cut);
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "control verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlVerify = (String)resultMap.get("value");
|
||||
@@ -1050,13 +1091,20 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
if (StringUtils.isNotBlank(fileTemplateName)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
fileTemplateName = fileTemplateName.replace(",",",");
|
||||
if (fileTemplateName.contains(",")) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板只能上传一个文件;";
|
||||
} else {
|
||||
errorMsg += "File template only can upload one;";
|
||||
}
|
||||
}
|
||||
for (String fileName : fileTemplateName.split(",")) {
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName,null,null,null,null,null);
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName);
|
||||
if (nowFileList.size() == 0) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板压缩包中没有" + fileName + "文件; ";
|
||||
} else {
|
||||
errorMsg += "附件模板 " + fileName + "isn't present in the cabinet;";
|
||||
errorMsg += "File template " + fileName + "isn't present in the cabinet;";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
@@ -1107,7 +1155,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// nio编号
|
||||
String nioNumber = ccDto.getNioNumber();
|
||||
resultMap = validateMustAndLength(nioNumber, "nio编号", 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(ccDto.getNioNumber())) {
|
||||
@@ -1120,17 +1168,17 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
}
|
||||
// 编号
|
||||
String paramsNumber = ccDto.getParamsNumber();
|
||||
resultMap = validateMustAndLength(paramsNumber, "编号", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||
resultMap = validateMustAndLength(paramsNumber, "编号", "number", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
// 参数名称
|
||||
String paramsName = ccDto.getParamsName();
|
||||
resultMap = validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(),"30", false, cut);
|
||||
resultMap = validateMustAndLength(paramsName, "参数名称", "params name", IsMustEnum.YES.getValue(),"30", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
// 参数说明
|
||||
String description = ccDto.getDescription();
|
||||
resultMap = validateMustAndLength(description, "参数说明", IsMustEnum.NO.getValue(),"200", false, cut);
|
||||
resultMap = validateMustAndLength(description, "参数说明", "description", IsMustEnum.NO.getValue(),"200", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
@@ -1166,25 +1214,25 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map<String, Object> validateMustAndLength (String value, String fieldName, String mustInput, String dbLength, Boolean isSingle, String cut) {
|
||||
private Map<String, Object> validateMustAndLength (String value, String fieldNameCn, String fieldNameEn, String mustInput, String dbLength, Boolean isSingle, String cut) {
|
||||
String errorMsg = "";
|
||||
int countError= 0;
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
errorMsg += fieldNameCn + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
errorMsg += fieldNameEn + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
errorMsg += fieldNameCn + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than" + dbLength + "char;";
|
||||
errorMsg += fieldNameEn + " can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1193,9 +1241,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
//判断是否是单选
|
||||
if (StringUtils.isNotBlank(value) && value.contains(",")) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为单选项;";
|
||||
errorMsg += fieldNameCn + "为单选项;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is single type;";
|
||||
errorMsg += fieldNameEn + " is single type;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1206,7 +1254,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
private Map<String, Object> getCodeByName(String value, String fieldName, String type, Map enumMap, List judgeData, List coverData,String cut) {
|
||||
private Map<String, Object> getCodeByName(String value, String fieldNameCn, String fieldNameEn, String type, Map enumMap, List judgeData, List coverData,String cut) {
|
||||
String errorMsg = "";
|
||||
int countError= 0;
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
@@ -1225,9 +1273,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
}
|
||||
if (!treeNameList.contains(lastValue)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + lastValue + "与数据字典不匹配;";
|
||||
errorMsg += fieldNameCn + "中的" + lastValue + "与数据字典不匹配;";
|
||||
} else {
|
||||
errorMsg += fieldName +" "+ lastValue + " does not match the data dictionary;";
|
||||
errorMsg += fieldNameEn +" "+ lastValue + " does not match the data dictionary;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1280,9 +1328,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (!itemNameList.contains(valueTemp)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + valueTemp + "与数据字典不匹配;";
|
||||
errorMsg += fieldNameCn + "中的" + valueTemp + "与数据字典不匹配;";
|
||||
} else{
|
||||
errorMsg += fieldName + " " + valueTemp + " does not match the data dictionary";
|
||||
errorMsg += fieldNameEn + " " + valueTemp + " does not match the data dictionary";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1315,9 +1363,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
value = (String) enumMap.get(value);
|
||||
} else {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + value + "不正确;";
|
||||
errorMsg += fieldNameCn + "中的" + value + "不正确;";
|
||||
} else{
|
||||
errorMsg += fieldName + " " + value + " is not correct";
|
||||
errorMsg += fieldNameEn + " " + value + " is not correct";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class ParamsInfoEnExport {
|
||||
private String isMust;
|
||||
|
||||
/**参数名称*/
|
||||
@Excel(name = "*param name", width = 15)
|
||||
@Excel(name = "*params name", width = 15)
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
private String paramsName;
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class ParamsInfoEnImport {
|
||||
private String isMust;
|
||||
|
||||
/**参数名称*/
|
||||
@Excel(name = "*param name", width = 15)
|
||||
@Excel(name = "*params name", width = 15)
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
private String paramsName;
|
||||
|
||||
|
||||
+4
@@ -61,6 +61,10 @@ public class OcrRecordEOController extends JeroController<OcrRecordEO, IOcrRecor
|
||||
@RequiresPermissions("ocr:ocrRecord:page")
|
||||
public Result<?> queryPageList(@RequestBody OcrRecordEOPage ocrRecordEOPage) {
|
||||
LambdaQueryWrapper<OcrRecordEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber())) {
|
||||
ocrRecordEOPage.setStandNumber(ocrRecordEOPage.getStandNumber().replace("%","\\%"));
|
||||
}
|
||||
|
||||
queryWrapper.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandName()), OcrRecordEO::getStandName, ocrRecordEOPage.getStandName())
|
||||
.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber()), OcrRecordEO::getStandNumber, ocrRecordEOPage.getStandNumber())
|
||||
.eq(StringUtils.isNotEmpty(ocrRecordEOPage.getResultContent()), OcrRecordEO::getResultContent, ocrRecordEOPage.getResultContent())
|
||||
|
||||
+25
-16
@@ -117,6 +117,7 @@ public class FileUnZip {
|
||||
|
||||
/**
|
||||
* 根据文件名称读取固定目录下文件
|
||||
* 适用范围:filename内容 dir/file
|
||||
* gaoyan
|
||||
* @param filename
|
||||
*/
|
||||
@@ -174,22 +175,30 @@ public class FileUnZip {
|
||||
}
|
||||
return resultlist;
|
||||
}
|
||||
// public static List<File> readFileByFilename(String path,String filename) {
|
||||
// List<File> resultlist = new ArrayList<>();
|
||||
// if (StringUtil.isNotEmpty(path)){
|
||||
// File file = new File(path);
|
||||
// if (file.isDirectory()) {
|
||||
// File[] files = file.listFiles();
|
||||
// for (File fi : files) {
|
||||
// // 对文件进行过滤
|
||||
// if (fi.getName().equals(filename)) {
|
||||
// resultlist.add(fi);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return resultlist;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 根据文件名称读取固定目录下文件
|
||||
* 适用范围:filename内容 dir/file; file
|
||||
* @param path
|
||||
* @param filename
|
||||
* @return
|
||||
*/
|
||||
public static List<File> readFileByFilename(String path,String filename) {
|
||||
List<File> resultlist = new ArrayList<>();
|
||||
if (StringUtil.isNotEmpty(path)){
|
||||
File file = new File(path);
|
||||
if (file.isDirectory()) {
|
||||
File[] files = file.listFiles();
|
||||
for (File fi : files) {
|
||||
// 对文件进行过滤
|
||||
if (fi.getName().equals(filename)) {
|
||||
resultlist.add(fi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultlist;
|
||||
}
|
||||
|
||||
/**
|
||||
*@Description: 删除某个文件
|
||||
|
||||
+3
-3
@@ -1217,7 +1217,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
String url = nowfilelist.get(0).getPath();
|
||||
MultipartFile multipartFile = createMfileByPath(url);
|
||||
@@ -1262,7 +1262,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
String url = nowfilelist.get(0).getPath();
|
||||
MultipartFile multipartFile = createMfileByPath(url);
|
||||
@@ -1311,7 +1311,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
String url = nowfilelist.get(0).getPath();
|
||||
MultipartFile multipartFile = createMfileByPath(url);
|
||||
|
||||
+3
-3
@@ -993,7 +993,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setFileName(nowfilelist.get(0).getName());
|
||||
@@ -1030,7 +1030,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setFileName(nowfilelist.get(0).getName());
|
||||
@@ -1069,7 +1069,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]);
|
||||
if (nowfilelist != null && !nowfilelist.isEmpty()) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setFileName(nowfilelist.get(0).getName());
|
||||
|
||||
Reference in New Issue
Block a user