|
@@ -1,8 +1,14 @@
|
|
|
package com.malk.junengtai.controller;
|
|
package com.malk.junengtai.controller;
|
|
|
|
|
|
|
|
import com.malk.junengtai.service.PurchaseService;
|
|
import com.malk.junengtai.service.PurchaseService;
|
|
|
|
|
+import com.malk.server.aliwork.YDConf;
|
|
|
|
|
+import com.malk.server.aliwork.YDParam;
|
|
|
|
|
+import com.malk.server.aliwork.YDSearch;
|
|
|
import com.malk.server.common.McException;
|
|
import com.malk.server.common.McException;
|
|
|
import com.malk.server.common.McR;
|
|
import com.malk.server.common.McR;
|
|
|
|
|
+import com.malk.service.aliwork.YDClient;
|
|
|
|
|
+import com.malk.service.dingtalk.DDClient;
|
|
|
|
|
+import com.malk.service.dingtalk.DDClient_Notice;
|
|
|
import com.malk.utils.UtilMap;
|
|
import com.malk.utils.UtilMap;
|
|
|
import com.malk.utils.UtilServlet;
|
|
import com.malk.utils.UtilServlet;
|
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
@@ -11,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
+import java.util.Collections;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@@ -20,6 +28,13 @@ public class PurchaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PurchaseService purchaseService;
|
|
private PurchaseService purchaseService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DDClient_Notice ddClientNotice;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DDClient ddClient;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private YDClient ydClient;
|
|
|
|
|
+
|
|
|
/*todo:手动同步档案表*/
|
|
/*todo:手动同步档案表*/
|
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
|
@PostMapping("/synchronizedArchiveTable")
|
|
@PostMapping("/synchronizedArchiveTable")
|
|
@@ -75,4 +90,20 @@ public class PurchaseController {
|
|
|
return McR.success(purchaseService.pickingList(body));
|
|
return McR.success(purchaseService.pickingList(body));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("/test")
|
|
|
|
|
+ public McR test(){
|
|
|
|
|
+
|
|
|
|
|
+ HashMap msg = new HashMap();
|
|
|
|
|
+ msg.put("msgtype","link");
|
|
|
|
|
+ HashMap linkMap = new HashMap();
|
|
|
|
|
+ linkMap.put("picUrl", "https://www.aliwork.com/");
|
|
|
|
|
+ linkMap.put("messageUrl", "https://www.aliwork.com/");
|
|
|
|
|
+ linkMap.put("text", "出库单:" + "21434"+"出库未生效请检查!");
|
|
|
|
|
+ linkMap.put("title", "《出库接口超时》");
|
|
|
|
|
+ msg.put("link",linkMap);
|
|
|
|
|
+ ddClientNotice.sendNotification(ddClient.getAccessToken(), Collections.singletonList("33205115111170152911"),null,false,msg);
|
|
|
|
|
+
|
|
|
|
|
+ return McR.success("接口通畅");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|