1
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.jarvis.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 闲管家订单:日日顺承运且已关联京东单的出库统计口径(与前台「手动推送/hasPlatformShipped」基本一致)。
|
||||
*/
|
||||
@Data
|
||||
public class GoofishRrsLogisticsStatsVo {
|
||||
|
||||
/** 已出库:有有效运单去重计数 + 无运单但已发货/完成或本系统发货成功的订单数 */
|
||||
private long shippedOutboundCount;
|
||||
|
||||
/** 待出库:平台「待发货」且无运单、且非本系统发货成功 */
|
||||
private long pendingOutboundCount;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.jarvis.mapper;
|
||||
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.dto.GoofishRrsLogisticsStatsVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -25,4 +26,9 @@ public interface ErpGoofishOrderMapper {
|
||||
List<ErpGoofishOrder> selectByGoofishOrderNo(@Param("orderNo") String orderNo);
|
||||
|
||||
int resetShipForRetry(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 已关联 jd_order_id、承运为日日顺(rrs 或名称含日日顺);排除已退款/已关闭。
|
||||
*/
|
||||
GoofishRrsLogisticsStatsVo selectRrsJdLinkedLogisticsStats();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery;
|
||||
import com.ruoyi.jarvis.dto.GoofishShipPreviewVo;
|
||||
import com.ruoyi.jarvis.dto.GoofishRrsLogisticsStatsVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,6 +18,9 @@ public interface IErpGoofishOrderService {
|
||||
*/
|
||||
void asyncPipelineAfterNotify(String appid, JSONObject notifyBody);
|
||||
|
||||
/** 日日顺 + 关联京东出库统计(侧边栏):已出库(去重运单口径)/待出库 */
|
||||
GoofishRrsLogisticsStatsVo selectRrsJdLinkedLogisticsStats();
|
||||
|
||||
List<ErpGoofishOrder> selectList(ErpGoofishOrder query);
|
||||
|
||||
ErpGoofishOrder selectById(Long id);
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.ruoyi.jarvis.domain.JDOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery;
|
||||
import com.ruoyi.jarvis.domain.ErpOpenConfig;
|
||||
import com.ruoyi.jarvis.dto.GoofishNotifyMessage;
|
||||
import com.ruoyi.jarvis.dto.GoofishRrsLogisticsStatsVo;
|
||||
import com.ruoyi.jarvis.dto.GoofishShipPreviewVo;
|
||||
import com.ruoyi.jarvis.mapper.ErpGoofishOrderEventLogMapper;
|
||||
import com.ruoyi.jarvis.mapper.ErpGoofishOrderMapper;
|
||||
@@ -83,6 +84,12 @@ public class ErpGoofishOrderServiceImpl implements IErpGoofishOrderService {
|
||||
goofishOrderPipeline.runFullPipeline(appid, notifyBody);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoofishRrsLogisticsStatsVo selectRrsJdLinkedLogisticsStats() {
|
||||
GoofishRrsLogisticsStatsVo vo = erpGoofishOrderMapper.selectRrsJdLinkedLogisticsStats();
|
||||
return vo != null ? vo : new GoofishRrsLogisticsStatsVo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ErpGoofishOrder> selectList(ErpGoofishOrder query) {
|
||||
return erpGoofishOrderMapper.selectList(query);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 物流信息扫描定时任务
|
||||
* 按配置周期(默认每 20 分钟)扫描分销标记为 F/PDD 等的订单(最近 30 天),拉物流并推送;
|
||||
* 按配置周期(默认每 5 分钟)扫描分销标记为 F/PDD 等的订单(最近 30 天),拉物流并推送;
|
||||
* 结束后处理企微分享链 adhoc 队列。
|
||||
*/
|
||||
@Component
|
||||
@@ -39,7 +39,7 @@ public class LogisticsScanTask {
|
||||
/**
|
||||
* 只扫描最近 30 天的订单(SQL 固定);周期与单轮上限见 jarvis.server.logistics.scan.*
|
||||
*/
|
||||
@Scheduled(cron = "${jarvis.server.logistics.scan.cron:0 */20 * * * ?}")
|
||||
@Scheduled(cron = "${jarvis.server.logistics.scan.cron:0 */5 * * * ?}")
|
||||
public void scanAndFetchLogistics() {
|
||||
long t0 = System.currentTimeMillis();
|
||||
int orderCandidates = 0;
|
||||
|
||||
Reference in New Issue
Block a user