demand: 定时扫描漏组批次从未组批次运单统计不准确的问题

committer: heyu
This commit is contained in:
aike 2025-07-09 09:32:29 +08:00
parent aba30b7d9b
commit 0b6f9aa1ed
2 changed files with 9 additions and 6 deletions

View File

@ -190,7 +190,7 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
try {
List<EmisWaybill> waybills = future.get();
allWaybills.addAll(waybills);
totalProcessed += waybills.size();
// totalProcessed += waybills.size();
} catch (Exception e) {
log.error("Error getting waybill results", e);
}
@ -225,6 +225,8 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
.filter(wb -> !Objects.equals(wb.getProblemType(), 170))
.collect(Collectors.toList());
totalProcessed = allWaybills.size();
// 按1000条数据分组处理
List<List<EmisWaybill>> batches = new ArrayList<>();
for (int i = 0; i < allWaybills.size(); i += pageSize) {

View File

@ -3812,15 +3812,16 @@
</insert>
<select id="selectWaybillListBySiteBatchStatus" resultMap="EmisWaybillResult">
select a.id, a.bill_code,a.trans_line_type, a.product_type,a.start_site_code,a.send_site_code,a.problem_type
select a.id, a.bill_code,a.trans_line_type,
a.product_type,a.start_site_code,a.send_site_code,a.problem_type,a.virtual_remark
from emis_waybill a
left join emis_waybill_batch_status b on a.bill_code = b.bill_code
where a.del_flag = '0'
and (b.site_batch_status is null or b.site_batch_status != '1')
left join emis_waybill_batch_status b on a.bill_code = b.bill_code
where a.del_flag = '0'
and (b.site_batch_status is null or b.site_batch_status != '1')
<if test="lineCode != null and lineCode != ''">
and a.trans_line_type = #{lineCode}
</if>
and a.send_date <![CDATA[ > ]]> '2025-01-01 00:00:00'
and a.send_date <![CDATA[ > ]]> '2025-01-01 00:00:00'
and a.send_date <![CDATA[ <= ]]> DATE_SUB(CURDATE(), INTERVAL 7 DAY)
and (a.problem_type is null or a.problem_type != 151)
and a.order_status not in ('0','2')