|
@@ -44,6 +44,8 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
|
|
|
@Autowired
|
|
|
private ExcelHandle excelHandle;
|
|
|
|
|
|
+ private final static String PROFILE = "/profile";
|
|
|
+
|
|
|
/**
|
|
|
* 查询施工单元
|
|
|
*
|
|
@@ -169,7 +171,9 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
|
|
|
|
|
|
@Override
|
|
|
public void importConsUnitHole(ConsUnitHole consUnitHole) {
|
|
|
- String filePath = consUnitHole.getFileId().replaceFirst(RuoYiConfig.getProfile(), RuoYiConfig.getUploadPath());
|
|
|
+ int lastIndex = RuoYiConfig.getUploadPath().lastIndexOf("/");
|
|
|
+ String filePath = consUnitHole.getFileId().replaceFirst(PROFILE,
|
|
|
+ RuoYiConfig.getUploadPath().substring(0, lastIndex));
|
|
|
excelHandle.importExcel(filePath, ConsPileHoleInfo.class, (data) -> {
|
|
|
data.forEach((d) -> {
|
|
|
d.setConsUnitId(consUnitHole.getId());
|