From 9f7368ceb60b8f5c635cf455914f435d8d782a90 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期六, 21 六月 2025 23:58:03 +0800
Subject: [PATCH] 添加钉钉推送消息功能

---
 src/test/java/com/gs/xky/XkyApplicationTests.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/test/java/com/gs/xky/XkyApplicationTests.java b/src/test/java/com/gs/xky/XkyApplicationTests.java
index 5599ace..7c2e4e0 100644
--- a/src/test/java/com/gs/xky/XkyApplicationTests.java
+++ b/src/test/java/com/gs/xky/XkyApplicationTests.java
@@ -40,6 +40,8 @@
     private MesInvItemArnService invItemArnService;
     @Autowired
     private PurchaseService service;
+    @Autowired
+    private DingtalkInfoService dingtalkInfoService;
 
     @Test
     void contextLoads() throws IOException {
@@ -58,7 +60,7 @@
     @Test
     void cs() throws IOException {
 
-        String str = "22250529EHH1";
+        String str = "2225060624DY;";
 
 
         String[] split = str.split(";");
@@ -77,6 +79,12 @@
             ApiResponse<XkyDetail> detail = apiService.sendListRequest(param, XkyDetail.class, "https://openapi.xiekeyun.com/delivery/getDetail.json");
 
             XkyDetail deliveryNo = detail.getData();
+
+            if (deliveryNo == null) {
+                System.out.println("涓虹┖鐨勯�佽揣鍗曞彿" + s);
+                return;
+            }
+
             if ("6".equals(deliveryNo.getStatus()) || "0".equals(deliveryNo.getLogisticsStatus())) {
                 XkyEntity xkyEntity = new XkyEntity();
                 xkyEntity.setDeliveryNo(deliveryNo.getDeliveryNo());
@@ -151,8 +159,12 @@
     }
 
     @Test
-    void cs3() throws IOException {
+    void cs3() throws Exception {
+//        dingtalkInfoService.sendMessage("CGJY20250412166");
 
-        service.syncPurchaseOrderDetails();
+//        XkyEntity xkyEntity = new XkyEntity();
+//        xkyEntity.setDeliveryNo("222505057541");
+//        xkyService.remove1(xkyEntity);
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3