demand: 轨迹预警定时任务剔除问题件类型

This commit is contained in:
aike 2026-01-19 11:45:27 +08:00
parent 7ac80898ed
commit 4e02d246a2
2 changed files with 8 additions and 6 deletions

View File

@ -6188,6 +6188,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
* 跟踪预警:查找长时间未更新扫描记录的运单并发送预警通知 * 跟踪预警:查找长时间未更新扫描记录的运单并发送预警通知
*/ */
@Override @Override
@Async
public void autoTraceWarning() { public void autoTraceWarning() {
try { try {
// 2026-01-01 00:00:00 之后的运单 // 2026-01-01 00:00:00 之后的运单

View File

@ -361,15 +361,12 @@
a3.phone as customer_phone, a3.phone as customer_phone,
a3.nick_name as customer_nick_name, a3.nick_name as customer_nick_name,
a3.avatar as customer_avatar, a3.avatar as customer_avatar,
-- COALESCE(wss.sales_support, a4.sales_support) as sales_support,
wss.id as waybill_other_id, wss.id as waybill_other_id,
wss.waybill_id as waybill_other_waybill_id, wss.waybill_id as waybill_other_waybill_id,
wss.bill_code as waybill_other_bill_code, wss.bill_code as waybill_other_bill_code,
COALESCE(wss.sales_support, mu2.sales_support, a4.sales_support) as waybill_other_sales_support, COALESCE(wss.sales_support, mu2.sales_support, a4.sales_support) as waybill_other_sales_support,
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id, COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
COALESCE(mu.company, mu2.company) as waybill_other_money_company, COALESCE(mu.company, mu2.company) as waybill_other_money_company,
-- COALESCE(mu2.payee, a.payee) as waybill_other_payee,
-- COALESCE(mu2.salesmen, a.salesmen) as waybill_other_salesmen,
p.emp_name as dispatch_man_name,q.site_name as print_site_name, p.emp_name as dispatch_man_name,q.site_name as print_site_name,
r.emp_name as print_man_name, r.emp_name as print_man_name,
@ -478,15 +475,12 @@
a3.avatar as customer_avatar, a3.avatar as customer_avatar,
COALESCE(a.payee, mu2.payee) as payee, COALESCE(a.payee, mu2.payee) as payee,
COALESCE(a.salesmen, mu2.salesmen) as salesmen, COALESCE(a.salesmen, mu2.salesmen) as salesmen,
-- COALESCE(wss.sales_support,mu2.sales_support, a4.sales_support) as sales_support ,
wss.id as waybill_other_id, wss.id as waybill_other_id,
wss.waybill_id as waybill_other_waybill_id, wss.waybill_id as waybill_other_waybill_id,
wss.bill_code as waybill_other_bill_code, wss.bill_code as waybill_other_bill_code,
COALESCE(wss.sales_support, mu2.sales_support, a4.sales_support) as waybill_other_sales_support, COALESCE(wss.sales_support, mu2.sales_support, a4.sales_support) as waybill_other_sales_support,
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id, COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
COALESCE(mu.company, mu2.company) as waybill_other_money_company, COALESCE(mu.company, mu2.company) as waybill_other_money_company,
-- COALESCE(mu2.payee, a.payee) as waybill_other_payee,
-- COALESCE(mu2.salesmen, a.salesmen) as waybill_other_salesmen,
a3.sales_executive , a3.sales_executive ,
a3.customer_type as customer_type, a3.customer_type as customer_type,
a3.main_user_id , a3.main_user_id ,
@ -656,6 +650,13 @@
) )
and DATEDIFF(curdate(), date(sr.scan_date)) <![CDATA[>=]]> 3 and DATEDIFF(curdate(), date(sr.scan_date)) <![CDATA[>=]]> 3
) )
<!-- 剔除问题件类型为面单删除、出口虚拟单、返货虚拟单的运单 -->
and NOT EXISTS (
SELECT 1 FROM emis_waybill_problem_info ewpi
WHERE ewpi.bill_code = a.bill_code
AND ewpi.del_flag = '0'
AND ewpi.problem_type IN (151, 170, 173)
)
limit #{offset}, #{pageSize} limit #{offset}, #{pageSize}
</select> </select>