From ecfa0455635ee12d575c7edad177a0e530c7452c Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 22 May 2024 08:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=BF=9D=E5=AD=98=E6=97=B6?= =?UTF-8?q?=E5=88=86=E6=89=B9=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ABAP_AS_WITH_POOL.jcoDestination | 4 ++-- .../ruoyi/factory/service/impl/CFactoryServiceImpl.java | 8 +++++++- .../ruoyi/material/service/impl/CMaterialServiceImpl.java | 8 +++++++- .../java/com/ruoyi/quot/service/impl/QuotServiceImpl.java | 7 ++++++- .../ruoyi/redBook/service/impl/RedBookServiceImpl.java | 8 +++++++- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index c0082bc..72d1398 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Tue May 21 16:05:10 CST 2024 +#Wed May 22 08:23:51 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.120 @@ -7,5 +7,5 @@ jco.client.saprouter= jco.client.user=RFC jco.client.sysnr=00 jco.destination.peak_limit=10 -jco.client.passwd=u]!Z{M|^ps7|OTDYVR9FX@#VvMHD7~y@=V7NzYJz?LvRTx~H +jco.client.passwd=654321 jco.client.client=300 diff --git a/ruoyi-system/src/main/java/com/ruoyi/factory/service/impl/CFactoryServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/factory/service/impl/CFactoryServiceImpl.java index a582fd6..2147f4a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/factory/service/impl/CFactoryServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/factory/service/impl/CFactoryServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.factory.service.impl; import java.util.List; import com.ruoyi.common.constant.UserConstants; +import com.ruoyi.material.domain.CMaterialCost; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -133,7 +134,12 @@ public class CFactoryServiceImpl implements ICFactoryService } if (list.size() > 0) { - cFactoryMapper.batchCMaterialType(list); + int batchSize = 200; // 每批次插入的数据量 + for (int i = 0; i < list.size(); i += batchSize) { + int toIndex = Math.min(i + batchSize, list.size()); + List subList = list.subList(i, toIndex); + cFactoryMapper.batchCMaterialType(subList); + } } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/material/service/impl/CMaterialServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/material/service/impl/CMaterialServiceImpl.java index 301946a..07df58c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/material/service/impl/CMaterialServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/material/service/impl/CMaterialServiceImpl.java @@ -4,6 +4,7 @@ import java.util.List; import com.ruoyi.material.domain.CMaterial; import com.ruoyi.material.domain.temp; +import com.ruoyi.quot.domain.QuotMaterial; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -126,7 +127,12 @@ public class CMaterialServiceImpl implements ICMaterialService } if (list.size() > 0) { - cMaterialMapper.batchCMaterialCost(list); + int batchSize = 200; // 每批次插入的数据量 + for (int i = 0; i < list.size(); i += batchSize) { + int toIndex = Math.min(i + batchSize, list.size()); + List subList = list.subList(i, toIndex); + cMaterialMapper.batchCMaterialCost(subList); + } } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java index 14fa645..a30a560 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java @@ -153,7 +153,12 @@ public class QuotServiceImpl implements IQuotService } if (list.size() > 0) { - quotMapper.batchQuotMaterial(list); + int batchSize = 200; // 每批次插入的数据量 + for (int i = 0; i < list.size(); i += batchSize) { + int toIndex = Math.min(i + batchSize, list.size()); + List subList = list.subList(i, toIndex); + quotMapper.batchQuotMaterial(subList); + } } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java index 92e4207..1e4e984 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.customer.domain.Bank; import com.ruoyi.customer.domain.Customer; +import com.ruoyi.material.domain.CMaterialCost; import com.ruoyi.redBook.domain.OAQuot; import com.ruoyi.redBook.domain.OAQuotProduct; import com.ruoyi.redBook.domain.Product; @@ -156,7 +157,12 @@ public class RedBookServiceImpl implements IRedBookService } if (list.size() > 0) { - oaRedBookMapper.batchOAQuotProduct(list); + int batchSize = 200; // 每批次插入的数据量 + for (int i = 0; i < list.size(); i += batchSize) { + int toIndex = Math.min(i + batchSize, list.size()); + List subList = list.subList(i, toIndex); + oaRedBookMapper.batchOAQuotProduct(subList); + } } } }