|
@@ -213,7 +213,7 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
|
|
|
// 第三步:将 机器设备-主模板-设备信息-段落模板 拼接到 写入数据到 机器设备-主模板
|
|
|
// 合并后文件的位置
|
|
|
- String mainMergePath = fileNetConfig.getBaseDir() + fileNetConfig.getAssetOutputCalculatePath() + System.currentTimeMillis() + "_MAIN_MERGE.xlsx";
|
|
|
+ String mainMergePath = fileNetConfig.getBaseDir() + fileNetConfig.getAssetOutputCalculatePath() + System.currentTimeMillis() + "_机器设备测算表.xlsx";
|
|
|
Workbook workbook = EasyExcelUtil.mergeExcel(mainDetailPath, mainPath, 0, 4, 0);
|
|
|
|
|
|
// 第四步:主模板设置公式
|
|
@@ -284,6 +284,9 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 删除进口设备临时文件
|
|
|
+ Files.delete(Paths.get(importedPath));
|
|
|
}
|
|
|
|
|
|
// 第六步:设置非标设备的测算表
|
|
@@ -337,6 +340,8 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 删除非标设备临时文件
|
|
|
+ Files.delete(Paths.get(nonstandardPath));
|
|
|
}
|
|
|
|
|
|
// 强制计算公式
|
|
@@ -348,6 +353,10 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
workbook.close();
|
|
|
outputStream.close();
|
|
|
|
|
|
+ // 删除测算表临时文件
|
|
|
+ Files.delete(Paths.get(mainDetailPath));
|
|
|
+ Files.delete(Paths.get(mainPath));
|
|
|
+
|
|
|
// 更新测算表进度
|
|
|
assetsCalculateMapper.updateCalculateProgress(calculateId, "FINISHED");
|
|
|
|