demand: 组树规则重构,虚拟单增加香港-缅甸快递逻辑。
committer: heyu
This commit is contained in:
parent
578d5d67c3
commit
410ec25e02
@ -220,6 +220,9 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 关闭线程池
|
||||||
|
executorService.shutdown();
|
||||||
|
|
||||||
// 全局去重
|
// 全局去重
|
||||||
Map<String, EmisWaybillBatchStatus> batchStatusMap = allBatchStatus.stream()
|
Map<String, EmisWaybillBatchStatus> batchStatusMap = allBatchStatus.stream()
|
||||||
.collect(Collectors.toMap(
|
.collect(Collectors.toMap(
|
||||||
@ -235,14 +238,24 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
|
|||||||
(existing, replacement) -> existing));
|
(existing, replacement) -> existing));
|
||||||
List<EmisTmsSiteBatchMiss> uniqueMissRecords = new ArrayList<>(missMap.values());
|
List<EmisTmsSiteBatchMiss> uniqueMissRecords = new ArrayList<>(missMap.values());
|
||||||
|
|
||||||
// 批量插入
|
// 批量插入 - 每次插入5000条
|
||||||
if (!uniqueBatchStatus.isEmpty()) {
|
if (!uniqueBatchStatus.isEmpty()) {
|
||||||
emisWaybillBatchStatusMapper.batchInsertEmisWaybillBatchStatus(uniqueBatchStatus);
|
int batchSize = 5000;
|
||||||
totalBatchStatusRecords += uniqueBatchStatus.size();
|
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()) {
|
if (!uniqueMissRecords.isEmpty()) {
|
||||||
emisTmsSiteBatchMissMapper.batchInsertEmisTmsSiteBatchMiss(uniqueMissRecords);
|
int batchSize = 5000;
|
||||||
totalMissRecords += uniqueMissRecords.size();
|
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();
|
long endTime = System.currentTimeMillis();
|
||||||
|
|||||||
@ -192,6 +192,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="blIsQuestion != null and blIsQuestion != ''">
|
<if test="blIsQuestion != null and blIsQuestion != ''">
|
||||||
AND w.bl_is_question = #{blIsQuestion}
|
AND w.bl_is_question = #{blIsQuestion}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="sendSiteCode != null and sendSiteCode != ''">
|
||||||
|
AND w.send_site_code = #{sendSiteCode}
|
||||||
|
</if>
|
||||||
<if test="params.beginSendDate != null and params.beginSendDate != ''">
|
<if test="params.beginSendDate != null and params.beginSendDate != ''">
|
||||||
and w.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
|
and w.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user