This commit is contained in:
linfso 2025-07-09 16:28:08 +08:00
commit 1166db3c8c
4 changed files with 16 additions and 9 deletions

View File

@ -56,6 +56,8 @@ public class EmisWaybill extends BaseEntity
private String billCodeSub;
/* 订单状态 字典 */
private String orderStatus;
/* 组批次状态 */
private String siteBatchStatus;
/* 运单状态 字典 */
private String waybillStatus;
/* 订单类型 0-预报订单 1-正式订单 */

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);
}
@ -223,8 +223,11 @@ public class EmisTmsSiteBatchMissServiceImpl extends EmisBaseService implements
allWaybills = allWaybills.stream()
.filter(wb -> !Objects.equals(wb.getProblemType(), 170))
.filter(wb -> !Objects.equals(wb.getSiteBatchStatus(), "1"))
.collect(Collectors.toList());
totalProcessed = allWaybills.size();
// 按1000条数据分组处理
List<List<EmisWaybill>> batches = new ArrayList<>();
for (int i = 0; i < allWaybills.size(); i += pageSize) {

View File

@ -131,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<when test="missCount == -4">
<!-- 当missCount=-4时,查询emis_waybill_batch_status表 -->
select
null as id, w.bill_code, '已组批次成功' as miss_reason,
distinct w.bill_code, null as id, '已组批次成功' as miss_reason,
null as create_by, null as create_time, null as update_by, null as update_time,
null as remark, '0' as del_flag,
w.trans_line_type as line_code, w.product_type, w.start_site_code, w.next_site_code,

View File

@ -48,6 +48,7 @@
<result property="calcFeeType" column="calc_fee_type" />
<result property="custNo" column="cust_no" />
<result property="custName" column="cust_name" />
<result property="siteBatchStatus" column="site_batch_status" />
<result property="transLineType" column="trans_line_type" />
<result property="productType" column="product_type" />
<result property="timeType" column="time_type" />
@ -3734,7 +3735,7 @@
</delete>
<delete id="deleteEmisWaybillByIds" parameterType="String">
update emis_waybill set del_flag='1
update emis_waybill set del_flag='1'
<if test="updateBy != null and updateBy != ''">,update_by = #{updateBy}</if>
<if test="updateSite != null and updateSite != ''">,update_site = #{updateSite}</if>
where id in
@ -3812,16 +3813,17 @@
</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,b.site_batch_status
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[ <= ]]> DATE_SUB(CURDATE(), INTERVAL 7 DAY)
and DATE_FORMAT(a.send_date, '%Y-%m-%d') <![CDATA[ >= ]]> '2025-01-01'
and DATE_FORMAT(a.send_date, '%Y-%m-%d') <![CDATA[ <= ]]> DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 7 DAY), '%Y-%m-%d')
and (a.problem_type is null or a.problem_type != 151)
and a.order_status not in ('0','2')
order by a.create_time desc