Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
-1
@@ -564,7 +564,11 @@ public class SysCategoryController {
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getSysCategoryTree")
|
||||
/**
|
||||
* 只查询技术领域的树形数据字典
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getSysCategoryTree")
|
||||
public Result getSysCategoryTree() {
|
||||
return Result.OK(sysCategoryService.getSysCategoryTree());
|
||||
}
|
||||
|
||||
+18
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -42,6 +43,23 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
@Autowired
|
||||
SysCategoryMapper sysCategoryMapper;
|
||||
|
||||
public List<String> getParentPath(SysCategory sysCategory){
|
||||
List<String> nameList = new ArrayList<>();
|
||||
nameList.add(sysCategory.getName());
|
||||
getParent(sysCategory, nameList);
|
||||
return nameList;
|
||||
}
|
||||
|
||||
private List<String> getParent(SysCategory sysCategory, List<String> nameList){
|
||||
SysCategory parent = sysCategoryMapper.selectById(sysCategory.getPid());
|
||||
if(ObjectUtil.isNotEmpty(parent)){
|
||||
nameList.add(parent.getName());
|
||||
}
|
||||
if(!"0".equals(sysCategory.getPid())){
|
||||
getParent(parent, nameList);
|
||||
}
|
||||
return nameList;
|
||||
}
|
||||
@Override
|
||||
public void addSysCategory(SysCategory sysCategory) {
|
||||
String categoryCode = "";
|
||||
|
||||
+2
@@ -20,6 +20,8 @@
|
||||
<result column="update_time" property="updateTime" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!--不行,改。哪有这么写SQL,嫌性能太好? TODO-->
|
||||
<select id="queryPageList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||
select
|
||||
plb.id,
|
||||
|
||||
+50
-68
@@ -388,11 +388,7 @@ public class FileSpiltService {
|
||||
treeList.add(documentTreeEO);
|
||||
|
||||
List<String> nowStart = new ArrayList<>();
|
||||
// if (sarFileSplitInfoEO.getStartNumber()<4){
|
||||
nowStart.add("1");
|
||||
// } else {
|
||||
// nowStart.add(String.valueOf(sarFileSplitInfoEO.getStartNumber()));
|
||||
// }
|
||||
nowStart.add("1");
|
||||
try {
|
||||
|
||||
//获取文件地址
|
||||
@@ -411,8 +407,8 @@ public class FileSpiltService {
|
||||
InputStream is = new FileInputStream(readFilePath); //需要将文件路更改为word文档所在路径。
|
||||
XWPFDocument doc = new XWPFDocument(is);
|
||||
|
||||
Pattern ptest ;
|
||||
Matcher matcher;
|
||||
// Pattern ptest ;
|
||||
// Matcher matcher;
|
||||
|
||||
// 记录拆分后的每一段文字
|
||||
List<IBodyElement> elements = doc.getBodyElements();
|
||||
@@ -430,78 +426,64 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.replace((char) 12288, ' ');
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
String numberParent = p.getNumLevelText().substring(0,p.getNumLevelText().lastIndexOf("."));
|
||||
if (numberMap.containsKey(numberParent)){
|
||||
Integer numbernow =(Integer)numberMap.get(numberParent)+1;
|
||||
if (messageList != null && !messageList.isEmpty() && messageList.get(messageList.size()-1).getItemsNum().equals(numberParent + "." + String.valueOf(numbernow))){
|
||||
numberMap.put(numberParent,numbernow+1);
|
||||
paragraphString = numberParent + "." + String.valueOf(numbernow+1)+ p.getText();
|
||||
} else {
|
||||
numberMap.put(numberParent,numbernow);
|
||||
paragraphString = numberParent + "." + String.valueOf(numbernow)+ p.getText();
|
||||
}
|
||||
} else {
|
||||
numberMap.put(numberParent,1);
|
||||
paragraphString = numberParent+".1"+ p.getText();
|
||||
}
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
// String numberParent = p.getNumLevelText().substring(0,p.getNumLevelText().lastIndexOf("."));
|
||||
// if (numberMap.containsKey(numberParent)){
|
||||
// Integer numbernow =(Integer)numberMap.get(numberParent)+1;
|
||||
// if (messageList != null && !messageList.isEmpty() && messageList.get(messageList.size()-1).getItemsNum().equals(numberParent + "." + String.valueOf(numbernow))){
|
||||
// numberMap.put(numberParent,numbernow+1);
|
||||
// paragraphString = numberParent + "." + String.valueOf(numbernow+1)+ p.getText();
|
||||
// } else {
|
||||
// numberMap.put(numberParent,numbernow);
|
||||
// paragraphString = numberParent + "." + String.valueOf(numbernow)+ p.getText();
|
||||
// }
|
||||
// } else {
|
||||
// numberMap.put(numberParent,1);
|
||||
// paragraphString = numberParent+".1"+ p.getText();
|
||||
// }
|
||||
// }
|
||||
|
||||
ptest = Pattern.compile("^[\\d.]*$");
|
||||
// ptest = Pattern.compile("^[\\d.]*$");
|
||||
boolean hasGoIf = false;
|
||||
for (int i=0;i<nowStart.size();i++){
|
||||
System.out.println(nowStart.get(i));
|
||||
if(paragraphString.startsWith(nowStart.get(i)) ){
|
||||
if(paragraphString.length()>nowStart.get(i).length()
|
||||
&& !ptest.matcher(paragraphString.substring(nowStart.get(i).length(),nowStart.get(i).length()+1)).matches()){
|
||||
// 判断名称,如果大于10位,取十位,
|
||||
String itemName = paragraphString.substring(nowStart.get(i).length()).length()>10?paragraphString.substring(nowStart.get(i).length(),nowStart.get(i).length()+10):paragraphString.substring(nowStart.get(i).length());
|
||||
List<String> clauseContent = new ArrayList<>();
|
||||
clauseContent.add(paragraphString);
|
||||
SarFileSplitItemsEO message = getSarFileSplitItemsEO(sarFileSplitInfoEO.getId(),nowStart.get(i),itemName,clauseContent);
|
||||
// 判断名称,如果大于10位,取十位,
|
||||
String itemName = paragraphString.substring(nowStart.get(i).length()).length()>10?paragraphString.substring(nowStart.get(i).length(),nowStart.get(i).length()+10):paragraphString.substring(nowStart.get(i).length());
|
||||
List<String> clauseContent = new ArrayList<>();
|
||||
clauseContent.add(paragraphString);
|
||||
SarFileSplitItemsEO message = getSarFileSplitItemsEO(sarFileSplitInfoEO.getId(),nowStart.get(i),itemName,clauseContent);
|
||||
|
||||
String[] numberStr = nowStart.get(i).split("\\.");
|
||||
if (Integer.valueOf(numberStr[0]) > sarFileSplitInfoEO.getStopNumber()){
|
||||
menuCanAdd = false;
|
||||
} else {
|
||||
// 增加一条数据,需要在数结构中加一条数据
|
||||
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i),treeList,generalCatalogueId,sarFileSplitInfoEO ,treeListDisplay++,itemName,enumByValue);
|
||||
treeList.add(sarFileSplitMenuEO) ;
|
||||
message.setMenuId(sarFileSplitMenuEO.getId());
|
||||
addItermsConditionsText(message,itemValList,paragraphString.substring(nowStart.get(i).length()));
|
||||
messageList.add(message);
|
||||
nowStart = getNewNowStart(nowStart.get(i));
|
||||
menuCanAdd = true;
|
||||
}
|
||||
hasGoIf = true;
|
||||
break;
|
||||
}else {
|
||||
// 判断名称,如果大于10位,取十位,
|
||||
String itemName = paragraphString.substring(nowStart.get(i).length()).length()>10?paragraphString.substring(nowStart.get(i).length(),nowStart.get(i).length()+10):paragraphString.substring(nowStart.get(i).length());
|
||||
List<String> clauseContent = new ArrayList<>();
|
||||
clauseContent.add(paragraphString);
|
||||
SarFileSplitItemsEO message = getSarFileSplitItemsEO(sarFileSplitInfoEO.getId(),nowStart.get(i),itemName,clauseContent);
|
||||
|
||||
String[] numberStr = nowStart.get(i).split("\\.");
|
||||
if (Integer.valueOf(numberStr[0]) > sarFileSplitInfoEO.getStopNumber()){
|
||||
menuCanAdd = false;
|
||||
} else {
|
||||
// 增加一条数据,需要在数结构中加一条数据
|
||||
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i),treeList,generalCatalogueId,sarFileSplitInfoEO ,treeListDisplay++,itemName,enumByValue);
|
||||
treeList.add(sarFileSplitMenuEO) ;
|
||||
message.setMenuId(sarFileSplitMenuEO.getId());
|
||||
addItermsConditionsText(message,itemValList,paragraphString.substring(nowStart.get(i).length()));
|
||||
messageList.add(message);
|
||||
nowStart = getNewNowStart(nowStart.get(i));
|
||||
menuCanAdd = true;
|
||||
}
|
||||
hasGoIf = true;
|
||||
break;
|
||||
String[] numberStr = nowStart.get(i).split("\\.");
|
||||
if (Integer.valueOf(numberStr[0]) > sarFileSplitInfoEO.getStopNumber()){
|
||||
menuCanAdd = false;
|
||||
} else {
|
||||
// 增加一条数据,需要在数结构中加一条数据
|
||||
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i),treeList,generalCatalogueId,sarFileSplitInfoEO ,treeListDisplay++,itemName,enumByValue);
|
||||
treeList.add(sarFileSplitMenuEO) ;
|
||||
message.setMenuId(sarFileSplitMenuEO.getId());
|
||||
addItermsConditionsText(message,itemValList,paragraphString.substring(nowStart.get(i).length()));
|
||||
messageList.add(message);
|
||||
nowStart = getNewNowStart(nowStart.get(i));
|
||||
menuCanAdd = true;
|
||||
}
|
||||
hasGoIf = true;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!hasGoIf && menuCanAdd) {
|
||||
if (!p.getText().equals("") ){
|
||||
addItermsConditionsText(messageList.get(messageList.size()-1),itemValList,p.getText());
|
||||
}
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph)p);
|
||||
if(CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size()-1),itemValList, p,imageBundleList);
|
||||
}
|
||||
// }
|
||||
hasGoIf = true;
|
||||
}
|
||||
// 判断是否直接跳出所有循环
|
||||
if (!menuCanAdd && messageList.size()>0) {
|
||||
break;
|
||||
|
||||
+329
-71
@@ -1324,11 +1324,22 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
String msg = "成功导入" + countSuccess + "条";
|
||||
String msg = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
msg = "成功导入" + countSuccess + "条";
|
||||
} else {
|
||||
msg = "import " + countSuccess + " datas successfully";
|
||||
}
|
||||
return Result.OK( msg, null);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
return Result.error(1,"导入失败");
|
||||
String msg = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
msg = "导入失败";
|
||||
} else {
|
||||
msg = "import failed";
|
||||
}
|
||||
return Result.error(1,msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1339,10 +1350,16 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
String str = file.getOriginalFilename().substring(pos+1).toLowerCase();
|
||||
String filenameorg = file.getOriginalFilename().substring(0,pos);
|
||||
String resultMsg = "";
|
||||
//判断上传文件必须是zip
|
||||
// TODO 允许导入rar
|
||||
if (!str.equals("zip")) {
|
||||
return Result.error("请上传zip文件");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "请上传zip文件";
|
||||
}else{
|
||||
resultMsg = "Please upload a zip file";
|
||||
}
|
||||
return Result.error(resultMsg);
|
||||
}
|
||||
String path = uploadpath + "/modal/"+filenameorg;
|
||||
File saveDirectory = new File(path);
|
||||
@@ -1359,11 +1376,22 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if(excelfilelist.size()<1){
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, "压缩包内没有上传Excel数据");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "压缩包内没有上传Excel数据";
|
||||
}else{
|
||||
resultMsg = "In the cabinet did not upload the Excel data";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
|
||||
} else if (excelfilelist.size()>1) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, "压缩包根目录下仅能存在一个excel为导入数据");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "压缩包根目录下仅能存在一个excel为导入数据";
|
||||
}else{
|
||||
resultMsg = "Only one Excel file can be imported in the compressed package root directory";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
}
|
||||
File excelfile = excelfilelist.get(0);
|
||||
// 导入参数设置,默认即可
|
||||
@@ -1377,7 +1405,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
String dbfields = getFieldForExport();
|
||||
List<String> dbfieldList = Arrays.asList(dbfields.split(",")); // 有顺序
|
||||
// 解析excel,并返回校验信息
|
||||
result = read(excelfile, dbfieldList,fields);
|
||||
result = read(excelfile, dbfieldList,fields,cut);
|
||||
Long getExcelInfo = System.currentTimeMillis();
|
||||
//excel读取到的数据
|
||||
List<Map<String, Object>> datas = result;
|
||||
@@ -1426,23 +1454,43 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}else{
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, "没有可导入的数据,请检查!");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "没有可导入的数据,请检查!";
|
||||
}else{
|
||||
resultMsg = "No data to import, please check";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
}
|
||||
} catch (NoSuchElementException e){
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, "没有可导入的数据,请检查!");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "没有可导入的数据,请检查!";
|
||||
}else{
|
||||
resultMsg = "No data to import, please check";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
} catch (JeroBootException e){
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error( 1, "读取失败,请严格按照模板文件导入数据");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "读取失败,请严格按照模板文件导入数据";
|
||||
}else{
|
||||
resultMsg = "The data fails to be read. Import data strictly according to the template file";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
return Result.error(1, "读取失败,请严格按照模板文件导入数据");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "读取失败,请严格按照模板文件导入数据";
|
||||
}else{
|
||||
resultMsg = "The data fails to be read. Import data strictly according to the template file";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1497,7 +1545,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
return mFile;
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles) throws IOException, InvalidFormatException {
|
||||
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws IOException, InvalidFormatException {
|
||||
|
||||
//最终返回数据
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
@@ -1527,13 +1575,25 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
cell.setCellType(CellType.STRING);
|
||||
String cellValue = cell.getStringCellValue().substring(cell.getStringCellValue().indexOf("*")+1);
|
||||
if(!cellValue.equals(titles[i])){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
} else{
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1667,7 +1727,12 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
for (Map<String, Object> dto : datas) {
|
||||
i++;
|
||||
int countError = 0; //记录失败数据数量
|
||||
String errorMsg = "第" + i + "行:";
|
||||
String errorMsg = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg = "第" + i + "行:";
|
||||
}else{
|
||||
errorMsg = i + " line:";
|
||||
}
|
||||
//判断发布日期,新车型实施日期,在产车实施日期
|
||||
|
||||
// try {
|
||||
@@ -1704,7 +1769,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
String value = (String) entry.getValue();
|
||||
String field = "";
|
||||
for (Map<String, Object> map : fieldList) {
|
||||
String fieldName = (String) map.get("db_field_txt");//中文名称
|
||||
String fieldName = (String) map.get("db_field_txt");//中文名称/英文名称
|
||||
String dbfieldName = (String) map.get("db_field_name");//字段名
|
||||
String mustInput = (String) map.get("field_must_input");//是否必填
|
||||
String dbLength = map.get("db_length").toString();//字段长度
|
||||
@@ -1717,20 +1782,36 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//树形
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
}else{
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than " + dbLength + " char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断数据是否匹配
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
value = value.replace(",",",");
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (!treeNameList.contains(valueTemp)) {
|
||||
errorMsg += fieldName + "中的" + valueTemp + "与数据字典不匹配;";
|
||||
String lastValue = valueTemp;
|
||||
if(valueTemp.contains("/")){
|
||||
lastValue = valueTemp.substring(valueTemp.lastIndexOf("/")+1);
|
||||
}
|
||||
if (!treeNameList.contains(lastValue)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + lastValue + "与数据字典不匹配;";
|
||||
} else {
|
||||
errorMsg += fieldName +" "+ lastValue + " does not match the data dictionary;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
@@ -1740,16 +1821,33 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
value = value.replace(",",",");
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (treeNameList.contains(valueTemp)) {
|
||||
// TODO 树形结构导入格式 a/b/c 需特殊处理
|
||||
String lastValue = valueTemp;
|
||||
if(valueTemp.contains("/")){
|
||||
lastValue = valueTemp.substring(valueTemp.lastIndexOf("/")+1);
|
||||
}
|
||||
if (treeNameList.contains(lastValue)) {
|
||||
List<SysCategory> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
|
||||
String finalLastValue = lastValue;
|
||||
collect = categoryList.stream().filter(e -> e.getName().equals(finalLastValue)).collect(Collectors.toList());
|
||||
} else if(CutEnum.EN.getValue().equals(cut)) {
|
||||
collect = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
|
||||
String finalLastValue1 = lastValue;
|
||||
collect = categoryList.stream().filter(e -> e.getEnName().equals(finalLastValue1)).collect(Collectors.toList());
|
||||
}
|
||||
if (collect.size() != 0) {
|
||||
valueIdList.add(collect.get(0).getId());
|
||||
if(collect.size() == 1){
|
||||
valueIdList.add(collect.get(0).getId());
|
||||
} else {
|
||||
// TODO 查询子节点的所有父节点
|
||||
for(SysCategory sysCategory : collect){
|
||||
List<String> nameList = sysCategoryService.getParentPath(sysCategory);
|
||||
List<String> targetNameList = Arrays.asList(valueTemp.split("/"));
|
||||
if(nameList.size() == targetNameList.size() && targetNameList.containsAll(nameList)) {
|
||||
valueIdList.add(sysCategory.getId());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1760,12 +1858,20 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//输入框
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
@@ -1773,13 +1879,22 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//输入框(数字)
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//正则判断仅能为 负号(-),小数点(.)和数字
|
||||
String regexNumber = "^(\\-|\\+)?\\d+(\\.\\d+)?$";
|
||||
if(StringUtils.isNotBlank(value) && !value.matches(regexNumber)){
|
||||
errorMsg += fieldName + "仅能为 负号(-),小数点(.)和数字;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "仅能为 负号(-),小数点(.)和数字;";
|
||||
|
||||
} else {
|
||||
errorMsg += fieldName + " only as a minus sign ( - ), dot (. ) and numbers;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
@@ -1787,23 +1902,39 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//下拉单选
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断是否是单选
|
||||
if (StringUtils.isNotBlank(value) && value.contains(",")) {
|
||||
errorMsg += fieldName + "为单选项;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为单选项;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is single type;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断数据是否匹配
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
if (!itemNameList.contains(value)) {
|
||||
errorMsg += fieldName + "中的" + value + "与数据字典不匹配;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + value + "与数据字典不匹配;";
|
||||
} else{
|
||||
errorMsg += fieldName + " " + value + " does not match the data dictionary";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
@@ -1823,12 +1954,20 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else if (FieldTypeEnum.PULL_MORE.getValue().equals(fieldShowType)) {
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//下拉多选
|
||||
@@ -1836,7 +1975,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
value = value.replace(",",",");
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (!itemNameList.contains(valueTemp)) {
|
||||
errorMsg += fieldName + "中的" + valueTemp + "与数据字典不匹配;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "中的" + valueTemp + "与数据字典不匹配;";
|
||||
} else{
|
||||
errorMsg += fieldName + " " + valueTemp + " does not match the data dictionary";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
@@ -1865,18 +2008,30 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//单选日期
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断是否是单日期选择
|
||||
value = value.replace(",",",");
|
||||
if (StringUtils.isNotBlank(value) && value.contains(",")) {
|
||||
errorMsg += fieldName + "为单日期选项;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为单日期选项;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is single date type;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断格式是否正确
|
||||
if (!DateUtils.isValidDate((String) value)) {
|
||||
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}else{
|
||||
errorMsg += fieldName + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
@@ -1884,26 +2039,41 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//多选日期
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断格式是否正确
|
||||
if (!DateUtils.isValidDate((String) value)) {
|
||||
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}else{
|
||||
errorMsg += fieldName + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
|
||||
} else if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) {
|
||||
//文件
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
@@ -1912,7 +2082,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
for (String fileName : value.split(",")) {
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName);
|
||||
if (nowFileList.size() == 0) {
|
||||
errorMsg += fieldName + "压缩包中没有" + fileName + "文件; ";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "压缩包中没有" + fileName + "文件; ";
|
||||
} else {
|
||||
errorMsg += fieldName + " " + fileName + "isn't present in the cabinet;";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
try {
|
||||
@@ -1939,12 +2113,20 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//标准选择
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " This parameter is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断长度
|
||||
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||
errorMsg += key + "不能超过" + dbLength + "个字符;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldName + " Can not be more than" + dbLength + "char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//判断库中是否存在,如果存在则存id,如果不存在则存输入的值
|
||||
@@ -1975,7 +2157,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//人员选择
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
String regexPerson = "^[\\u4e00-\\u9fa5]{0,}\\([A-Za-z0-9.]*\\)$";
|
||||
@@ -1985,7 +2171,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for(int u=0 ; u<userNames.length; u++){
|
||||
if(!userNames[u].matches(regexPerson)) {
|
||||
errorMsg += fieldName + "格式不正确,填写格式:姓名(账号);";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "格式不正确,填写格式:姓名(账号);";
|
||||
} else {
|
||||
errorMsg += fieldName + "Not in the correct format, fill in the format:name(account);";
|
||||
}
|
||||
countError++;
|
||||
}else {
|
||||
String uName = userNames[u].substring(userNames[u].indexOf("(") + 1, userNames[u].indexOf(")"));
|
||||
@@ -2002,7 +2192,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
//输入框(链接)
|
||||
//判断是否必填
|
||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldName + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += fieldName + " is mandatory and cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
//正则判断仅能为 负号(-),小数点(.)和数字
|
||||
@@ -2011,7 +2205,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if(!valueTemp.matches(regexLink)) {
|
||||
errorMsg += valueTemp + "不是正确的链接格式,必须以http或https开头;";
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += valueTemp + "不是正确的链接格式,必须以http或https开头;";
|
||||
} else {
|
||||
errorMsg += valueTemp + " is not the correct format, you must start with HTTP or https";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
@@ -2037,8 +2235,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
map.put("result", false);
|
||||
String html = "";
|
||||
for (String message : stringMessage) {
|
||||
html += message;
|
||||
// html += message + "</br>";
|
||||
// html += message;
|
||||
html += message + "</br>";
|
||||
}
|
||||
map.put("message", html);
|
||||
}
|
||||
@@ -2294,6 +2492,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
List<String> dateSingleList = new LinkedList<>();//单选日期字段
|
||||
List<String> dateMoreList = new LinkedList<>();//多选日期字段
|
||||
List<String> standardList = new LinkedList<>();//标准选择字段
|
||||
List<String> treeList = new LinkedList<>();//树形结构字段
|
||||
for (Map<String, Object> map : addForm) {
|
||||
if ("1".equals(map.get("field_must_input"))) {
|
||||
sb.append("*" + map.get("db_field_txt") + ",");
|
||||
@@ -2325,53 +2524,112 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else if (FieldTypeEnum.STANDARD.getValue().equals(map.get(fieldShowType))) {
|
||||
//标准选择字段
|
||||
standardList.add((String) map.get("db_field_txt"));
|
||||
} else if (FieldTypeEnum.TREE.getValue().equals(map.get(fieldShowType))) {
|
||||
//树形结构字段
|
||||
treeList.add((String) map.get("db_field_txt"));
|
||||
}
|
||||
}
|
||||
String title = sb.substring(0, sb.length() - 1);
|
||||
|
||||
//第二行
|
||||
StringBuilder sbTwo = new StringBuilder();
|
||||
sbTwo.append("填写说明\n" + "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n" + "2.所有带*号的字段必须填写\n");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
sbTwo.append("填写说明\n" + "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n" + "2.所有带*号的字段必须填写\n");
|
||||
}else{
|
||||
sbTwo.append("Filling explanation\n"
|
||||
+ "1.Import data starts at the third line, the first line is the header, the second line is the description, and the third line is the official data\n"
|
||||
+ "2.All fields marked with * must be filled in\n");
|
||||
}
|
||||
int count = 3;
|
||||
if (pullSingleList.size() != 0) {
|
||||
//单选
|
||||
String pullSingle = StringUtils.join(pullSingleList, ",") + "字段为单选属性,必须和系统中的对应字段选项相匹配\n";
|
||||
sbTwo.append(count++ + "." + pullSingle);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String pullSingle = StringUtils.join(pullSingleList, ",") + "字段是单选属性,必须和系统中的对应字段选项相匹配\n";
|
||||
sbTwo.append(count++ + "." + pullSingle);
|
||||
}else{
|
||||
String pullSingle = StringUtils.join(pullSingleList, ",") + " fields are single type,Must match the corresponding field option in the system\n";
|
||||
sbTwo.append(count++ + "." + pullSingle);
|
||||
}
|
||||
}
|
||||
if (textNumberList.size() != 0) {
|
||||
//单选
|
||||
String textNumber = StringUtils.join(textNumberList, ",") + "字段仅能填写数字,负数,小数\n";
|
||||
sbTwo.append(count++ + "." + textNumber);
|
||||
//文本框(数字)
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
String textNumber = StringUtils.join(textNumberList, ",") + "字段仅能填写数字,负数,小数\n";
|
||||
sbTwo.append(count++ + "." + textNumber);
|
||||
} else {
|
||||
String textNumber = StringUtils.join(textNumberList, ",") + " fields can only fill in the numbers, negative numbers, fractions\n";
|
||||
sbTwo.append(count++ + "." + textNumber);
|
||||
}
|
||||
}
|
||||
if (pullMoreList.size() != 0) {
|
||||
//多选
|
||||
String pullMore = StringUtils.join(pullMoreList, ",") + "字段为多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + pullMore);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String pullMore = StringUtils.join(pullMoreList, ",") + "字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + pullMore);
|
||||
}else{
|
||||
String pullMore = StringUtils.join(pullMoreList, ",") + " fields are multi-select type, must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n";
|
||||
sbTwo.append(count++ + "." + pullMore);
|
||||
}
|
||||
}
|
||||
if (dateSingleList.size() != 0) {
|
||||
//单选日期
|
||||
String dateSingle = StringUtils.join(dateSingleList, ",") + "字段为日期,必须精确到日\n";
|
||||
sbTwo.append(count++ + "." + dateSingle);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String dateSingle = StringUtils.join(dateSingleList, ",") + "字段为日期,必须精确到日\n";
|
||||
sbTwo.append(count++ + "." + dateSingle);
|
||||
}else{
|
||||
String dateSingle = StringUtils.join(dateSingleList, ",") + " fields are date type, must be exact to the day\n";
|
||||
sbTwo.append(count++ + "." + dateSingle);
|
||||
}
|
||||
}
|
||||
if (dateMoreList.size() != 0) {
|
||||
//多选日期
|
||||
String dateMore = StringUtils.join(dateMoreList, ",") + "字段为日期,必须精确到日,可填写多个,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + dateMore);
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
String dateMore = StringUtils.join(dateMoreList, ",") + "字段为日期,必须精确到日,可填写多个,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + dateMore);
|
||||
} else {
|
||||
String dateMore = StringUtils.join(dateMoreList, ",") + " fields are date type, must be accurate to a day, fill in more, fill out multiple commas in English or Chinese segmentation\n";
|
||||
sbTwo.append(count++ + "." + dateMore);
|
||||
}
|
||||
}
|
||||
if (textStringList.size() != 0) {
|
||||
//输入框
|
||||
String textString = StringUtils.join(textStringList, ",") + "字段为文本,填写文本内容\n";
|
||||
sbTwo.append(count++ + "." + textString);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String textString = StringUtils.join(textStringList, ",") + "字段为文本,填写文本内容\n";
|
||||
sbTwo.append(count++ + "." + textString);
|
||||
}else{
|
||||
String textString = StringUtils.join(textStringList, ",") + " fields are text type. Enter the text content\n";
|
||||
sbTwo.append(count++ + "." + textString);
|
||||
}
|
||||
}
|
||||
if (standardList.size() != 0) {
|
||||
//标准选择
|
||||
String standard = StringUtils.join(standardList, ",") + "字段为标准号,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + standard);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String standard = StringUtils.join(standardList, ",") + "字段为标准号,填写多个时采用英文或中文逗号分割\n";
|
||||
sbTwo.append(count++ + "." + standard);
|
||||
}else{
|
||||
String standard = StringUtils.join(standardList, ",") + " fields are standard number type. If you fill in more than one field, separate it with English or Chinese commas\n";
|
||||
sbTwo.append(count++ + "." + standard);
|
||||
}
|
||||
}
|
||||
if (fileList.size() != 0) {
|
||||
//文件
|
||||
String file = StringUtils.join(fileList, ",") + "字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.pdf,则应填写AAA/B.pdf\n";
|
||||
sbTwo.append(count++ + "." + file);
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String file = StringUtils.join(fileList, ",") + "字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.pdf,则应填写AAA/B.pdf\n";
|
||||
sbTwo.append(count++ + "." + file);
|
||||
}else{
|
||||
String file = StringUtils.join(fileList, ",") + " fields are file type, must create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. Assume that the file is saved in the AAA standard numberB.pdf,Should fill inAAA/B.pdf\n";
|
||||
sbTwo.append(count++ + "." + file);
|
||||
}
|
||||
}
|
||||
if (treeList.size() != 0) {
|
||||
//树形结构
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String tree = StringUtils.join(treeList, ",") + "字段为树形结构,填写的数据每层级间用反斜杠(/)划分,如A/B/C代表A层级下B,B层级下的C\n";
|
||||
sbTwo.append(count++ + "." + tree);
|
||||
}else{
|
||||
String tree = StringUtils.join(treeList, ",") + " fields are tree type,Fill in the data between each level with a backslash ( / ) partition, such as b,b under a/b/c represent a hierarchy level under the C\n";
|
||||
sbTwo.append(count++ + "." + tree);
|
||||
}
|
||||
}
|
||||
List<String> resultList = new LinkedList<>();
|
||||
resultList.add(title);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version=1.1.0
|
||||
|
||||
filesize-max=5242880
|
||||
storage-folder=D:\\OOFILES
|
||||
storage-folder=
|
||||
|
||||
files.docservice.fill-docs=.oform|.docx
|
||||
files.docservice.viewed-docs=.pdf|.djvu|.xps|.oxps
|
||||
@@ -9,15 +9,15 @@ files.docservice.edited-docs=.docx|.xlsx|.csv|.pptx|.txt|.docxf
|
||||
files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2
|
||||
files.docservice.timeout=120000
|
||||
|
||||
files.docservice.url.site=http://172.29.96.1:9000/
|
||||
files.docservice.url.command=http://172.29.96.1:9000/coauthoring/CommandService.ashx
|
||||
files.docservice.url.site=http://10.10.10.46:8103/
|
||||
files.docservice.url.command=http://10.10.10.46:8103/coauthoring/CommandService.ashx
|
||||
|
||||
files.docservice.url.converter= http://172.29.96.1:9000/ConvertService.ashx
|
||||
files.docservice.url.tempstorage= http://172.29.96.1:9000/ResourceService.ashx
|
||||
files.docservice.url.api= http://172.29.96.1:9000/web-apps/apps/api/documents/api.js
|
||||
files.docservice.url.preloader= http://172.29.96.1:9000/web-apps/apps/api/documents/cache-scripts.html
|
||||
files.docservice.url.converter= http://10.10.10.46:8103/ConvertService.ashx
|
||||
files.docservice.url.tempstorage= http://10.10.10.46:8103/ResourceService.ashx
|
||||
files.docservice.url.api= http://10.10.10.46:8103/web-apps/apps/api/documents/api.js
|
||||
files.docservice.url.preloader= http://10.10.10.46:8103/web-apps/apps/api/documents/cache-scripts.html
|
||||
|
||||
files.docservice.url.example= http://172.29.96.1:9000
|
||||
files.docservice.url.example= http://10.10.10.46:8103
|
||||
|
||||
|
||||
files.docservice.secret=
|
||||
|
||||
@@ -638,8 +638,8 @@ module.exports = {
|
||||
KMVSS_Article: 'KMVSS Article',
|
||||
America: '美国',
|
||||
Europe: '欧洲',
|
||||
Japan_one: '日本 Attachment',
|
||||
Japan_two: '日本 Article',
|
||||
Japan_one: 'Japan Attachment',
|
||||
Japan_two: 'Japan Article',
|
||||
China: '中国',
|
||||
onlyOnefileUploaded: '只能上传一个文件',
|
||||
typeCannotUploaded: '不支持上传该类型的文件',
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
var xhr = new XMLHttpRequest();
|
||||
let fileName= this.$route.query.fileName
|
||||
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||
xhr.open("GET", 'http://10.0.1.25:8080/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
|
||||
xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
|
||||
xhr.responseType = "blob";
|
||||
headers.forEach((header) => {
|
||||
xhr.setRequestHeader(header[0], header[1]);
|
||||
|
||||
@@ -128,7 +128,8 @@
|
||||
},
|
||||
rowId:'',
|
||||
rows:[],
|
||||
type:'pdf'
|
||||
type:'pdf',
|
||||
flag:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -215,16 +216,22 @@
|
||||
// }else if(file.text_info=='相关资料'){
|
||||
// params.fileType='6'
|
||||
// }
|
||||
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
eventBUs.$emit('searchReset')
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
|
||||
if(!this.flag){
|
||||
this.flag=true
|
||||
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
eventBUs.$emit('searchReset')
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
// this.$emit('exportVisible',true)
|
||||
}else{
|
||||
this.$message.warning(this.$t('OnlyPDF'))
|
||||
|
||||
@@ -282,6 +282,7 @@
|
||||
parameter:{},
|
||||
widthBrown:'',
|
||||
creenWidth: document.body.clientWidth,
|
||||
brownHeight:document.documentElement.clientHeight,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@@ -302,9 +303,11 @@
|
||||
const that = this;
|
||||
let client=''
|
||||
let width=''
|
||||
this.widthBrown = document.documentElement.offsetWidth || document.body.offsetWidth
|
||||
this.widthBrown = window.screenWidth || document.body.clientWidth;
|
||||
client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
|
||||
width = this.widthBrown - client.left
|
||||
let iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
|
||||
document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
|
||||
document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
|
||||
window.addEventListener('resize', () => {
|
||||
that.screenWidth = window.screenWidth || document.body.clientWidth;
|
||||
@@ -312,6 +315,8 @@
|
||||
// console.log('screenWidth',that.screenWidth)
|
||||
width = that.screenWidth - client.left
|
||||
document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
|
||||
iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
|
||||
document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
|
||||
}, false);
|
||||
|
||||
|
||||
@@ -1131,6 +1136,7 @@
|
||||
|
||||
padding-right: 20px;
|
||||
border-right: 1px solid #E6E7EC;
|
||||
overflow-y: auto;
|
||||
.split-detail-left-tree{
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- 模板下载-->
|
||||
|
||||
<div class="operator-select-type">
|
||||
<span class="operator-file-type">{{$t('fileType')}}</span>
|
||||
<span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
|
||||
<a-select v-model="fileGroup" :placeholder="$t('selectFileType')" class="file-type-select">
|
||||
<a-select-option value="GSO" key="GSO" title="GSO">
|
||||
GSO
|
||||
@@ -291,6 +291,14 @@
|
||||
line-height: 32px;
|
||||
display: inline-block;
|
||||
margin-right: 16px;
|
||||
.operator-i{
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
text-align: center;
|
||||
color:#f5222d;
|
||||
}
|
||||
}
|
||||
.operator-select-type{
|
||||
display: flex;
|
||||
|
||||
@@ -275,11 +275,13 @@
|
||||
this.key=value
|
||||
if(value==1){
|
||||
this.submitKey='1'
|
||||
this.queryParam.pageNo=1
|
||||
this.loadData(1)
|
||||
// this.tableData=this.taglab
|
||||
// this.tableData=this.taglabSplit
|
||||
}else if(value==2){
|
||||
this.submitKey='2'
|
||||
this.queryParam.pageNo=1
|
||||
this.loadData(0)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
@input="handleInput('attestationType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
||||
:triggerChange="false" :dictCode="'attestation_type'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -200,6 +200,40 @@
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="attestationRank">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('attestationRank')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'attestation_rank'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="implementType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('implementType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'implement_type'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
@@ -231,7 +265,7 @@
|
||||
@input="handleInput('designDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -302,7 +336,7 @@
|
||||
@input="handleInput('prehomoDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -374,7 +408,7 @@
|
||||
@input="handleInput('verifyDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user