修改OTA优化

This commit is contained in:
高嵩
2023-06-08 16:20:37 +08:00
parent 897e4b6768
commit a0fed7dfdd
2 changed files with 5 additions and 3 deletions
@@ -141,7 +141,7 @@ public class OtaBaSjGnxtwhServiceImpl extends ServiceImpl<OtaBaSjGnxtwhMapper, O
for (OtaBaSjGnxtwh wh : list) { for (OtaBaSjGnxtwh wh : list) {
String[] strs = wh.getDykzq().split(","); String[] strs = wh.getDykzq().split(",");
for (String str : strs) { for (String str : strs) {
if (str.equals(kzq)) { if (kzq.contains(str)) {
return wh.getGnxt(); return wh.getGnxt();
} }
} }
@@ -269,13 +269,15 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
List<String> oldYjbbList = otaBaSjSjxtbh.stream().map(OtaBaSjSjxtbh::getYjbb).distinct().collect(Collectors.toList()); List<String> oldYjbbList = otaBaSjSjxtbh.stream().map(OtaBaSjSjxtbh::getYjbb).distinct().collect(Collectors.toList());
List<String> oldTempFileNameList = new ArrayList<>(); List<String> oldTempFileNameList = new ArrayList<>();
oldYjbbList.forEach(sjSjxtbh -> { oldYjbbList.forEach(sjSjxtbh -> {
oldTempFileNameList.add(sjSjxtbh.replaceAll("","") + ".docx"); if (StringUtils.isNotEmpty(sjSjxtbh)) {
oldTempFileNameList.add(sjSjxtbh.replaceAll("", "") + ".docx");
}
}); });
int tempFileIndex = 1; int tempFileIndex = 1;
String tempFilePath = uploadPath + "tempFile" + "/" + otaId; String tempFilePath = uploadPath + "tempFile" + "/" + otaId;
File tempFile = new File(tempFilePath); File tempFile = new File(tempFilePath);
if(!tempFile.exists()){ if (!tempFile.exists()) {
tempFile.mkdirs(); tempFile.mkdirs();
} }
List<String> tempFileNames = new ArrayList<>(); List<String> tempFileNames = new ArrayList<>();