pruple_boy 1 年之前
父節點
當前提交
4f99cb3c7e

+ 11 - 3
mjava-shanghaishiwei/src/main/java/com/malk/shanghaishiwei/controller/SHHWController.java

@@ -5,6 +5,7 @@ import com.malk.Util.UtilFile;
 import com.malk.Util.UtilHttp;
 import com.malk.Util.UtilMap;
 import com.malk.Util.UtilServlet;
+import com.malk.delegate.McDelegate;
 import com.malk.server.common.FilePath;
 import com.malk.server.common.McException;
 import com.malk.server.common.McR;
@@ -31,6 +32,9 @@ public class SHHWController {
     @Autowired
     private HTService htService;
 
+    @Autowired
+    private McDelegate mcDelegate;
+
     @PostMapping("h3yun-http")
     McR http(@RequestBody Map<String, String> data, @RequestParam("code") String code) {
 
@@ -47,14 +51,18 @@ public class SHHWController {
                 htService.deleteContract(data);
                 break;
             case "file": {
-                // prd: 后补盖章附件
-                String fileNames = htService.addAttachments(data, null);
-                return McR.success(UtilMap.map("fileNames", fileNames));
+                // prd: 后补盖章附件 [ ppExt: 24.7.25 氚云流程结束, 直接获取附件免得给会返回空, 因此添加延迟, 将 fileNames 替换为 已归档
+                mcDelegate.setTimeout(() -> {
+                    htService.addAttachments(data, null);
+                }, 2000);
+                //String fileNames = htService.addAttachments(data, null);
+                return McR.success(UtilMap.map("fileNames", "已归档"));
             }
             default:
                 McException.exceptionAccess("code 不合法");
                 break;
         }
+
         return McR.success();
     }
 

+ 4 - 1
mjava-shanghaishiwei/src/main/java/com/malk/shanghaishiwei/service/impl/HTImplService.java

@@ -11,6 +11,7 @@ import com.malk.service.h3yun.CYClient;
 import com.malk.shanghaishiwei.server.HTConf;
 import com.malk.shanghaishiwei.service.HTClient;
 import com.malk.shanghaishiwei.service.HTService;
+import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +62,7 @@ public class HTImplService implements HTService {
      * 添加附件
      */
     @Override
+    @SneakyThrows
     public String addAttachments(Map<String, String> data, String origionContractCode) {
         // prd: 非政采合同, 使用流水号
         if (StringUtils.isBlank(origionContractCode)) {
@@ -78,7 +80,8 @@ public class HTImplService implements HTService {
         for (Map attachment : attachments) {
             File file = cyClient.saveFromTemporaryUrl(ddClient.getAccessToken(), attachment);
             String fileName = UtilMap.getString(attachment, "FileName");
-            String fileType = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
+            String fileType = fileName.substring(fileName.lastIndexOf(".")).toLowerCase().replace(".", "");
+            fileName = fileName.substring(0, fileName.lastIndexOf(".")); // 24.6.7 文件名称不传递后缀, 文件类型不传递. [ppExt: .不支持split]
             fileName = origionContractCode + "_" + UtilDateTime.format(new Date(), "yyyyMMddHHmmss") + "_" + index + "_" + fileName;
             Map body = UtilMap.map("origionContractCode, fileType, fileName", origionContractCode, fileType, fileName);
             body.put("contractType", 1); // 采购合同

+ 1 - 1
mjava-shanghaishiwei/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Thu Nov 09 07:56:06 CST 2023
+#Thu Jul 25 01:14:56 CST 2024
 version=1.0-SNAPSHOT
 groupId=com.malk
 artifactId=mjava-shanghaishiwei

+ 8 - 0
mjava-shanghaishiwei/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1,8 @@
+com/malk/shanghaishiwei/Boot.class
+com/malk/shanghaishiwei/server/HTConf.class
+com/malk/shanghaishiwei/service/impl/HTImplService.class
+com/malk/shanghaishiwei/service/HTClient.class
+com/malk/shanghaishiwei/service/impl/HTImplClient.class
+com/malk/shanghaishiwei/controller/SHHWController.class
+com/malk/shanghaishiwei/server/HTR.class
+com/malk/shanghaishiwei/service/HTService.class

二進制
mjava-shanghaishiwei/target/mjava-shanghaishiwei.jar.original


+ 5 - 0
mjava-shijianguan/target/maven-archiver/pom.properties

@@ -0,0 +1,5 @@
+#Generated by Maven
+#Thu Jul 25 01:14:17 CST 2024
+version=1.0-SNAPSHOT
+groupId=com.malk
+artifactId=mjava-shijianguan

+ 2 - 0
mjava-shijianguan/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1,2 @@
+com/malk/shijianguan/controller/ShiJianGuanController.class
+com/malk/shijianguan/Boot.class

+ 2 - 0
mjava-shijianguan/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,2 @@
+/Users/malk/server/java-mcli-2/mjava-shijianguan/src/main/java/com.malk.shijianguan/Boot.java
+/Users/malk/server/java-mcli-2/mjava-shijianguan/src/main/java/com.malk.shijianguan/controller/ShiJianGuanController.java

二進制
mjava-shijianguan/target/mjava-shijianguan.jar.original


+ 3 - 4
mjava-xiding/src/main/java/com/malk/xiding/controller/XDController.java

@@ -78,10 +78,9 @@ public class XDController {
         log.info("###### [XD]同步审批单开始 ######");
         long endTime = new Date().getTime() - 0 * 24 * 60 * 60 * 1000L;
         long startTime = endTime - 45 * 24 * 60 * 60 * 1000L;
-        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_CC, "出差");
-//        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_WC, "外出");
-
-        xdService.syncApprove(UtilDateTime.parseDate("2024-01-08").getTime(), UtilDateTime.parseDate("2024-01-10").getTime(), XDConf.TMP_CODE_WC, "外出");
+//        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_CC, "出差");
+        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_WC, "外出");
+//        xdService.syncApprove(UtilDateTime.parseDate("2024-01-08").getTime(), UtilDateTime.parseDate("2024-01-10").getTime(), XDConf.TMP_CODE_WC, "外出");
         return McR.success();
     }
 

+ 17 - 0
mjava/src/main/java/com/malk/delegate/McDelegate.java

@@ -0,0 +1,17 @@
+package com.malk.delegate;
+
+import org.springframework.scheduling.annotation.Async;
+
+public interface McDelegate {
+
+    /**
+     * 异步线程回调
+     */
+    @Async
+    void setTimeout(Invoke fn, long millis);
+
+    @FunctionalInterface
+    interface Invoke {
+        void execute();
+    }
+}

+ 21 - 0
mjava/src/main/java/com/malk/delegate/impl/McImplDelegate.java

@@ -0,0 +1,21 @@
+package com.malk.delegate.impl;
+
+import com.malk.delegate.McDelegate;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class McImplDelegate implements McDelegate {
+
+    @SneakyThrows
+    @Async
+    @Override
+    public void setTimeout(Invoke fn, long millis) {
+
+        Thread.sleep(millis);
+        fn.execute();
+    }
+}

+ 0 - 60
mjava/target/classes/META-INF/spring-configuration-metadata.json

@@ -35,16 +35,6 @@
       "type": "com.malk.server.common.FilePath$Path",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
-    {
-      "name": "file.path",
-      "type": "com.malk.server.common.FilePath$Path",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
-    {
-      "name": "file.path",
-      "type": "com.malk.server.common.FilePath$Path",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
     {
       "name": "file.source",
       "type": "com.malk.server.common.FilePath$Source",
@@ -55,16 +45,6 @@
       "type": "com.malk.server.common.FilePath$Source",
       "sourceType": "com.malk.server.common.FilePath$Source"
     },
-    {
-      "name": "file.source",
-      "type": "com.malk.server.common.FilePath$Source",
-      "sourceType": "com.malk.server.common.FilePath$Source"
-    },
-    {
-      "name": "file.source",
-      "type": "com.malk.server.common.FilePath$Source",
-      "sourceType": "com.malk.server.common.FilePath$Source"
-    },
     {
       "name": "fxiaoke",
       "type": "com.malk.server.fxiaoke.FXKConf",
@@ -189,56 +169,16 @@
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
-    {
-      "name": "file.path.file",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
-    {
-      "name": "file.path.file",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
     {
       "name": "file.path.image",
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
-    {
-      "name": "file.path.image",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
-    {
-      "name": "file.path.image",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
-    {
-      "name": "file.path.tmp",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
     {
       "name": "file.path.tmp",
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
-    {
-      "name": "file.path.tmp",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Path"
-    },
-    {
-      "name": "file.source.fonts",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Source"
-    },
-    {
-      "name": "file.source.fonts",
-      "type": "java.lang.String",
-      "sourceType": "com.malk.server.common.FilePath$Source"
-    },
     {
       "name": "file.source.fonts",
       "type": "java.lang.String",

+ 1 - 1
mjava/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Wed Apr 03 17:26:36 CST 2024
+#Fri Jun 07 00:41:09 CST 2024
 version=1.0-SNAPSHOT
 groupId=com.malk
 artifactId=mjava

+ 10 - 0
mjava/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -9,6 +9,7 @@ com/malk/Util/UtilMc.class
 com/malk/Filter/RequestInterceptor.class
 com/malk/service/aliyun/impl/ALYInvoiceImpl.class
 com/malk/Util/UtilMath.class
+com/malk/delegate/McDelegate.class
 com/malk/server/aliwork/YDParam$Retrieve_FormInstId.class
 com/malk/Util/UtilImport$UtilImportBuilder.class
 com/malk/server/aliwork/YDParam$Delete.class
@@ -17,6 +18,7 @@ com/malk/Util/UtilDateTime.class
 com/malk/config/mutilSource/SlaveConfig.class
 com/malk/server/aliwork/YDR.class
 com/malk/service/dingtalk/impl/DDImplClient.class
+com/malk/repository/entity/primary/McTablePo$McTablePoBuilder.class
 com/malk/server/aliwork/YDConf.class
 com/malk/service/dingtalk/impl/DDImplClient_Storage.class
 com/malk/server/ekuaibao/EKBR.class
@@ -29,6 +31,7 @@ com/malk/server/tencent/TXYConf.class
 com/malk/server/h3yun/CYConf$ACTION_NAME.class
 com/malk/service/xbongbong/impl/XBBImplClient.class
 com/malk/test/McTestController$TModel.class
+com/malk/base/BaseDto.class
 com/malk/config/WebConfiguration.class
 com/malk/Util/UtilServlet.class
 com/malk/Util/UtilHttp.class
@@ -42,11 +45,13 @@ com/malk/service/dingtalk/impl/DDImplClient_Contacts.class
 com/malk/server/aliwork/YDParam$Create_Process.class
 com/malk/service/ekuaibao/EKBClient.class
 com/malk/service/dingtalk/DDClient_Workflow.class
+META-INF/spring-configuration-metadata.json
 com/malk/controller/DDCallbackController.class
 com/malk/Boot.class
 com/malk/test/dto/Async2Sync.class
 com/malk/Util/UtilExcel.class
 com/malk/base/BaseRepository.class
+com/malk/repository/entity/slave/JpaMapSlave.class
 com/malk/config/mutilSource/DataSourceConfig.class
 com/malk/service/dingtalk/DDService.class
 com/malk/server/common/FilePath$Path.class
@@ -65,7 +70,9 @@ com/malk/server/common/McR.class
 com/malk/Util/UtilEnv.class
 com/malk/server/aliyun/ALYR.class
 com/malk/service/dingtalk/DDClient.class
+com/malk/repository/entity/mutual/McAuthorizationPo.class
 com/malk/server/aliwork/YDParam$Retrieve_Condition_Update.class
+com/malk/base/BasePo.class
 com/malk/schedule/McScheduleTask.class
 com/malk/server/common/McREnum.class
 com/malk/repository/entity/primary/QMcTablePo.class
@@ -84,6 +91,7 @@ com/malk/service/xbongbong/XBBClient.class
 com/malk/server/aliwork/YDParam$Update.class
 com/malk/Util/UtilList.class
 com/malk/test/McTestController.class
+com/malk/delegate/impl/McImplDelegate.class
 com/malk/server/dingtalk/crypto/DingCallbackCrypto.class
 com/malk/Util/UtilMc$1Obj.class
 com/malk/Util/UtilImport.class
@@ -107,6 +115,7 @@ com/malk/repository/dao/primary/McTableDao.class
 com/malk/server/aliwork/YDParam$Delete_ProcessInstanceId.class
 com/malk/service/dingtalk/impl/DDImplClient_Attendance.class
 com/malk/test/dto/User.class
+com/malk/delegate/McDelegate$Invoke.class
 com/malk/config/JpaConfiguration.class
 com/malk/Util/UtilHttp$1.class
 com/malk/service/dingtalk/impl/DDImplService.class
@@ -115,6 +124,7 @@ com/malk/server/dingtalk/DDFormComponentDto.class
 com/malk/service/aliwork/impl/YDServiceImpl.class
 com/malk/service/aliwork/YDService.class
 com/malk/server/common/McR$McRBuilder.class
+com/malk/base/JpaMap.class
 com/malk/server/aliwork/YDParam$Retrieve_ProcessInstanceId.class
 com/malk/Util/UtilMap.class
 com/malk/server/aliwork/YDConf$FORM_QUERY.class