From fb43fede78d461b78d5fcd1456b95b8768a01e3e Mon Sep 17 00:00:00 2001 From: JIAL <2287346125@qq.com> Date: Wed, 13 Mar 2024 10:07:51 +0800 Subject: [PATCH] 1 --- .../web/controller/material/CMaterialController.java | 6 +++--- .../web/utils/{JDBCBatchInsert.java => JDBCBatch.java} | 8 ++++---- ruoyi-ui/src/views/quotePage/quote/index.vue | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) rename ruoyi-admin/src/main/java/com/ruoyi/web/utils/{JDBCBatchInsert.java => JDBCBatch.java} (97%) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/material/CMaterialController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/material/CMaterialController.java index 571bf16..a8e0cc1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/material/CMaterialController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/material/CMaterialController.java @@ -13,7 +13,7 @@ import com.ruoyi.material.domain.material; import com.ruoyi.material.domain.temp; import com.ruoyi.materialType.domain.CMaterialType; import com.ruoyi.materialType.service.ICMaterialTypeService; -import com.ruoyi.web.utils.JDBCBatchInsert; +import com.ruoyi.web.utils.JDBCBatch; import org.apache.commons.collections4.ListUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -727,8 +727,8 @@ public class CMaterialController extends BaseController System.out.println("costs======================="+costs.size()); try { - JDBCBatchInsert.insertMaterialBatch(materials); - JDBCBatchInsert.insertCostBatch(costs); + JDBCBatch.insertMaterialBatch(materials); + JDBCBatch.insertCostBatch(costs); }catch (Exception e) { throw new Exception(e.getMessage(), e); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatchInsert.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatch.java similarity index 97% rename from ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatchInsert.java rename to ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatch.java index 3ad2c2a..8409e9f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatchInsert.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/JDBCBatch.java @@ -14,7 +14,7 @@ import java.util.List; import java.util.Random; @Component -public class JDBCBatchInsert { +public class JDBCBatch { private static String databaseURL; public static String getDatabaseURL() { @@ -23,7 +23,7 @@ public class JDBCBatchInsert { @Value(value = "${spring.datasource.druid.quot.url}") public void setDatabaseUR(String databaseURL) { - JDBCBatchInsert.databaseURL = databaseURL; + JDBCBatch.databaseURL = databaseURL; } private static String username; @@ -31,7 +31,7 @@ public class JDBCBatchInsert { @Value(value = "${spring.datasource.druid.quot.username}") public void setUsername(String username) { - JDBCBatchInsert.username = username; + JDBCBatch.username = username; } private static String password; @@ -41,7 +41,7 @@ public class JDBCBatchInsert { @Value(value = "${spring.datasource.druid.quot.password}") public void setPassword(String password) { - JDBCBatchInsert.password = password; + JDBCBatch.password = password; } public static void insertMaterialBatch(List list) throws IOException { diff --git a/ruoyi-ui/src/views/quotePage/quote/index.vue b/ruoyi-ui/src/views/quotePage/quote/index.vue index 91e4214..7275117 100644 --- a/ruoyi-ui/src/views/quotePage/quote/index.vue +++ b/ruoyi-ui/src/views/quotePage/quote/index.vue @@ -516,6 +516,7 @@