From b007f76a4165aac2cbb4ba7725b0ea9d4914efc3 Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期五, 17 五月 2024 18:27:30 +0800
Subject: [PATCH] 钻孔导入功能_1
---
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java | 81 ++++++++++++++++++++--------------------
1 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
index 088a3ee..b7422a6 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
@@ -110,44 +110,43 @@
*/
@Override
public int deleteHoleByIds(String ids) {
-
// 鎵归噺鍒犻櫎閽诲瓟涓嬮潰鐨勫叧鑱旀暟鎹�
- String[] strings = Convert.toStrArray(ids);
- if (!ObjectUtils.isEmpty(strings)) {
- for (String holeId : strings) {
-
- // =======鏍囪疮==========
- List<HoleBiaoguan> biaoguans = holeBiaoguanMapper.selectHoleBiaoguanByHoleId(holeId);
- String[] biaoguanIds = biaoguans.stream().map(HoleBiaoguan::getIds).toArray(String[]::new);
-
- // =======鍥炴==========
- List<HoleHuici> holeHuicis = holeHuiciMapper.selectHoleHuiciByHoleId(holeId);
- String[] huiCiIds = holeHuicis.stream().map(HoleHuici::getIds).toArray(String[]::new);
-
- // =======浜哄憳==========
- List<HolePerson> persons = holePersonMapper.selectHolePersonByHoleId(holeId);
- String[] personIds = persons.stream().map(HolePerson::getIds).toArray(String[]::new);
-
- // =======鍙栧湡==========
- List<HoleQutu> qutus = holeQutuMapper.selectHoleQutuByHoleId(holeId);
- String[] qutuIds = qutus.stream().map(HoleQutu::getIds).toArray(String[]::new);
-
- // =======姘翠綅==========
- List<HoleShuiwei> shuiweis = holeShuiweiMapper.selectHoleShuiWeiByHoleId(holeId);
- String[] shuiweiIds = shuiweis.stream().map(HoleShuiwei::getIds).toArray(String[]::new);
-
- // =======宀╁湡==========
- List<HoleYantu> yantus = holeYantuMapper.selectHoleYantuListByHoleId(holeId);
- String[] yantusIds = yantus.stream().map(HoleYantu::getIds).toArray(String[]::new);
-
- holeBiaoguanMapper.deleteHoleBiaoguanByIds(biaoguanIds);
- holeHuiciMapper.deleteHoleHuiciByIds(huiCiIds);
- holePersonMapper.deleteHolePersonByIds(personIds);
- holeQutuMapper.deleteHoleQutuByIds(qutuIds);
- holeShuiweiMapper.deleteHoleShuiweiByIds(shuiweiIds);
- holeYantuMapper.deleteHoleYantuByIds(yantusIds);
- }
- }
+// String[] strings = Convert.toStrArray(ids);
+// if (!ObjectUtils.isEmpty(strings)) {
+// for (String holeId : strings) {
+//
+// // =======鏍囪疮==========
+// List<HoleBiaoguan> biaoguans = holeBiaoguanMapper.selectHoleBiaoguanByHoleId(holeId);
+// String[] biaoguanIds = biaoguans.stream().map(HoleBiaoguan::getIds).toArray(String[]::new);
+//
+// // =======鍥炴==========
+// List<HoleHuici> holeHuicis = holeHuiciMapper.selectHoleHuiciByHoleId(holeId);
+// String[] huiCiIds = holeHuicis.stream().map(HoleHuici::getIds).toArray(String[]::new);
+//
+// // =======浜哄憳==========
+// List<HolePerson> persons = holePersonMapper.selectHolePersonByHoleId(holeId);
+// String[] personIds = persons.stream().map(HolePerson::getIds).toArray(String[]::new);
+//
+// // =======鍙栧湡==========
+// List<HoleQutu> qutus = holeQutuMapper.selectHoleQutuByHoleId(holeId);
+// String[] qutuIds = qutus.stream().map(HoleQutu::getIds).toArray(String[]::new);
+//
+// // =======姘翠綅==========
+// List<HoleShuiwei> shuiweis = holeShuiweiMapper.selectHoleShuiWeiByHoleId(holeId);
+// String[] shuiweiIds = shuiweis.stream().map(HoleShuiwei::getIds).toArray(String[]::new);
+//
+// // =======宀╁湡==========
+// List<HoleYantu> yantus = holeYantuMapper.selectHoleYantuListByHoleId(holeId);
+// String[] yantusIds = yantus.stream().map(HoleYantu::getIds).toArray(String[]::new);
+//
+// holeBiaoguanMapper.deleteHoleBiaoguanByIds(biaoguanIds);
+// holeHuiciMapper.deleteHoleHuiciByIds(huiCiIds);
+// holePersonMapper.deleteHolePersonByIds(personIds);
+// holeQutuMapper.deleteHoleQutuByIds(qutuIds);
+// holeShuiweiMapper.deleteHoleShuiweiByIds(shuiweiIds);
+// holeYantuMapper.deleteHoleYantuByIds(yantusIds);
+// }
+// }
return holeMapper.deleteHoleByIds(Convert.toStrArray(ids));
}
@@ -171,9 +170,11 @@
try {
String dest = saveExcel(file);
List<Hole> list = readData(dest);
- for (Hole item : list) {
-
- insertHole(item);
+ if(!ObjectUtils.isEmpty(list)){
+ for (Hole item : list) {
+ item.setProjectId(projectId);
+ insertHole(item);
+ }
}
} catch (Exception e) {
return e.toString();
--
Gitblit v1.9.1