Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+65
-1
@@ -43,6 +43,7 @@ import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.xkcoding.http.util.StringUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
@@ -1335,7 +1336,15 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
for (String fileName : deliverableTemplate.split(",")) {
|
||||
List<File> nowFileList = new ArrayList<>();
|
||||
|
||||
nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,authDummyInventoryInfoEO.getCut(),errorMsg,msgList,nameCn,nameEn);
|
||||
nowFileList = this.readFileByFilename(
|
||||
zipEntryName,
|
||||
authDummyInventoryInfoEO.getSerialNumber() + "/" + fileName,
|
||||
authDummyInventoryInfoEO.getCut(),
|
||||
errorMsg,
|
||||
msgList,
|
||||
nameCn,
|
||||
nameEn
|
||||
);
|
||||
|
||||
if (nowFileList.size() == 0) {
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
@@ -1366,6 +1375,61 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
return value;
|
||||
}
|
||||
|
||||
public List<File> readFileByFilename(String path,
|
||||
String filename,
|
||||
String cut,
|
||||
String errorMsg,
|
||||
List<String> msgList,
|
||||
String nameCn,
|
||||
String nameEn) {
|
||||
String filenameOne = "";
|
||||
String filenameTwo = "";
|
||||
if(filename.contains("/")){
|
||||
filenameOne = filename.split("/")[0];
|
||||
filenameTwo = filename.split("/")[1];
|
||||
}
|
||||
List<File> resultlist = new ArrayList<>();
|
||||
if (StringUtil.isNotEmpty(path) && StringUtils.isNotBlank(filenameOne)){
|
||||
File file = new File(path);
|
||||
if (file.isDirectory()) {
|
||||
File[] files = file.listFiles();
|
||||
for (File fi : files) {
|
||||
if(fi.isDirectory()){
|
||||
File[] filesTemp = fi.listFiles();
|
||||
for (File fileTemp : filesTemp) {
|
||||
// 对文件进行过滤
|
||||
if (fileTemp.getName().equals(filenameTwo) && fi.getPath().contains(filenameOne)) {
|
||||
resultlist.add(fileTemp);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// 对文件进行过滤
|
||||
if (fi.getName().equals(filenameTwo) && fi.getPath().contains(filenameOne)) {
|
||||
resultlist.add(fi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(resultlist.size() == 0){
|
||||
String name = "";
|
||||
if(filename.contains("/")){
|
||||
name = filenameTwo;
|
||||
}else{
|
||||
name = filename;
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += nameCn + name + "格式不正确或者压缩包中没有" + name + "文件,请参考模板下载中的说明";
|
||||
}else{
|
||||
errorMsg += nameEn + name + " Incorrect format or not present in compressed package " + name + " file please refer to the description in template download;";
|
||||
}
|
||||
if(msgList != null){
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}
|
||||
return resultlist;
|
||||
}
|
||||
|
||||
private String getTreeId(List<SysCategory> categoryList, AuthDummyInventoryInfoEO authDummyInventoryInfoEOTemp,
|
||||
List<String> treeNameList, String value) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user