Browse Source

华高捕获异调整

wzy 2 weeks ago
parent
commit
53d19e6a9c

+ 6 - 1
mjava-huagao/src/main/java/com/malk/huagao/service/impl/KdHuaGaoServiceImpl.java

@@ -532,6 +532,8 @@ public class KdHuaGaoServiceImpl implements KdHuaGaoService {
     public void syncPRDReturnMtrl(String userId) {
         MDC.put("MDC_KEY_PID","1002");
 
+        log.info("开始同步生产退料明细");
+
         //创建看板更新记录
         if (Strings.isBlank(userId)){
             userId = "yida_pub_account";
@@ -656,6 +658,7 @@ public class KdHuaGaoServiceImpl implements KdHuaGaoService {
             if (Objects.nonNull(userId)){
                 sendDdMsg(ddClient.getAccessToken(),ddConf.getAgentId(),userId,"更新" + type + "异常:" + e.getMessage() + "  时间:" + DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
             }
+            throw new RuntimeException(e);
         }
     }
 
@@ -772,6 +775,8 @@ public class KdHuaGaoServiceImpl implements KdHuaGaoService {
     public void syncDLVNotice(String userId) {
         MDC.put("MDC_KEY_PID","1002");
 
+        log.info("开始同步生产退料明细");
+
         //创建看板更新记录
         if (Strings.isBlank(userId)){
             userId = "yida_pub_account";
@@ -933,7 +938,7 @@ public class KdHuaGaoServiceImpl implements KdHuaGaoService {
             msg.put("msgtype","text");
             //获取当前时间 精确到秒
             String time = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
-            msg.put("text", UtilMap.map("content",content));
+            msg.put("text", UtilMap.map("content, aa",content,""));
             body3.put("msg",msg);
             UtilHttp.doPost("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2",null,param2,body3);
         }

+ 9 - 1
mjava-huagao/src/test/java/com/malk/huagao/KdTest.java

@@ -202,7 +202,15 @@ public class KdTest {
 
     @Test
     public void test8(){
-        kdHuaGaoService.syncReport("成品/样机出库看板","344749020127590108");
+        kdHuaGaoService.syncReport("成品库存天数看板","344749020127590108");
+    }
+
+    @Test
+    public void test9(){
+        String s = "更新成品库存天数看板异常:McException(success=false, code=InvalidpageSize, message=Specified parameter pageSize is not valid., source=dingtalk_new)  时间:2025-12-01 10:28:09";
+        Map<String, Object> aaa = UtilMap.map("aaa, aa", s,"");
+
+        System.out.println("aaa"+JSONObject.toJSONString(aaa));
     }
 
     private IdentifyInfo initIden(){