Merge pull request 'demand: 组树规则重构,虚拟单增加香港-缅甸快递逻辑。' (#73) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/73
This commit is contained in:
commit
e6f99d48f0
@ -220,6 +220,9 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭线程池
|
||||
executorService.shutdown();
|
||||
|
||||
// 全局去重
|
||||
Map<String, EmisWaybillBatchStatus> batchStatusMap = allBatchStatus.stream()
|
||||
.collect(Collectors.toMap(
|
||||
@ -235,14 +238,24 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
||||
(existing, replacement) -> existing));
|
||||
List<EmisTmsSiteBatchMiss> uniqueMissRecords = new ArrayList<>(missMap.values());
|
||||
|
||||
// 批量插入
|
||||
// 批量插入 - 每次插入5000条
|
||||
if (!uniqueBatchStatus.isEmpty()) {
|
||||
emisWaybillBatchStatusMapper.batchInsertEmisWaybillBatchStatus(uniqueBatchStatus);
|
||||
totalBatchStatusRecords += uniqueBatchStatus.size();
|
||||
int batchSize = 5000;
|
||||
for (int i = 0; i < uniqueBatchStatus.size(); i += batchSize) {
|
||||
int end = Math.min(i + batchSize, uniqueBatchStatus.size());
|
||||
List<EmisWaybillBatchStatus> batch = uniqueBatchStatus.subList(i, end);
|
||||
emisWaybillBatchStatusMapper.batchInsertEmisWaybillBatchStatus(batch);
|
||||
totalBatchStatusRecords += batch.size();
|
||||
}
|
||||
}
|
||||
if (!uniqueMissRecords.isEmpty()) {
|
||||
emisTmsSiteBatchMissMapper.batchInsertEmisTmsSiteBatchMiss(uniqueMissRecords);
|
||||
totalMissRecords += uniqueMissRecords.size();
|
||||
int batchSize = 5000;
|
||||
for (int i = 0; i < uniqueMissRecords.size(); i += batchSize) {
|
||||
int end = Math.min(i + batchSize, uniqueMissRecords.size());
|
||||
List<EmisTmsSiteBatchMiss> batch = uniqueMissRecords.subList(i, end);
|
||||
emisTmsSiteBatchMissMapper.batchInsertEmisTmsSiteBatchMiss(batch);
|
||||
totalMissRecords += batch.size();
|
||||
}
|
||||
}
|
||||
|
||||
long endTime = System.currentTimeMillis();
|
||||
|
||||
@ -192,6 +192,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="blIsQuestion != null and blIsQuestion != ''">
|
||||
AND w.bl_is_question = #{blIsQuestion}
|
||||
</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">
|
||||
AND w.send_site_code = #{sendSiteCode}
|
||||
</if>
|
||||
<if test="params.beginSendDate != null and params.beginSendDate != ''">
|
||||
and w.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
|
||||
</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user